Anyone know how i can move f.ex. 20 files from one folder to another with 30 seconds deley between each file move ? The files are going into a refining process that needs to be finished before the next file arrives.
Would like to choose the folder that holds the files and select the destination folder.
PB 17, Cube, Mini, PM G4, Mac Pro,
Mac OS X (10.4.2)
Open the Script Editor in the /Applications/AppleScript/ folder and enter the following:
set source_folder to (choose folder with prompt "What is the source folder?")
set destination_folder to (choose folder with prompt "What is the destination folder?")
tell application "Finder"
repeat with this_item in (get files of source_folder)
duplicate this_item to destination_folder
delay 30-- time in seconds
end repeat
end tell
Press the Run button in the Script Editor to use the script.
The process that the files are going trough removes the files from the destination folder after finishing.
Can i wait for the destination folder to become empty instead of the delay do you think?
(The time it takes for the process in the destination folder may vary depending on the filesize)
set source_folder to (choose folder with prompt "What is the source folder?")
set destination_folder to (choose folder with prompt "What is the destination folder?")
tell application "Finder"
repeat with this_item in (get files of source_folder)
set the
newfile to (duplicate this_item to destination_folder)
repeat
if not exists the
newfile then
exit repeat
else
delay 1
end if
end repeat
end tell
This thread has been closed by the system or the community team.
You may vote for any posts you find helpful, or search the Community for additional answers.
Automator action with delay
Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.