I’m working on the script below:
tell application "Finder"
select disk "Preflight"
select folder "Inprogress" of disk "Preflight"
select folder "Working" of folder "Inprogress" of disk Preflight
Now here’s where I get lost, I want to open the folder thats’s inside the folder “working”. That folders name will
change every time. Once that folder is open, I want to locate the file that contains “.pdf” and move it to another
folder of the disk “Preflight” Can anyone help?
" I’m working on the script below: tell application …"
There is no reason to select/open through the heirarchical folders. Since you know the path, just open it.
" Now here’s where I get lost, I want to open the folder thats’s inside the folder “working”. "
There no special Applescript solution. However:
open every folder of folder [path to working]
I haven’t worked with dates much in the Finder, but it may be possible to
open every folder [or first folder] whose creation date > stored_date
– stored date is a property which the script applet
– will remember after each run
And then there is
set old_list to name of every folder in folder [path to working]
– old_list is a property, which the script will remember
– after each run
set new_list to name of every folder in folder [path to working]
repeat with a_name in new_list
if (contents of a_name) is not in old_list then open folder a_name
set old_list to new_list
WARNING: the above is pseudocode; it doesn’t list every tell, set, or other command necessary for it function.