Moving large PDF files with Applescript
Moving large PDF files with Applescript
- Subject: Moving large PDF files with Applescript
- From: "Mielke, Gary R (CGC)" <email@hidden>
- Date: Tue, 31 Mar 2009 09:21:12 -0500
- Thread-topic: Moving large PDF files with Applescript
Title: Moving large PDF files with Applescript
We are currently using the following script to watch a Source Folder and move files into other folders. One problem that we are having is that when the files are being copied into the source folder, the script will try and grab the file before it is completely copied. Is there other ways to write the Applescript to watch for a file to make sure the file is completely copied before moving or is there another solution that would work better than Applescript? The files that we are watching are PDF files. Any suggestions, thoughts or ideas would be appreciated!
property strDest1 : "VolumeDestination:FolderA:"
--property strDest2 : " VolumeDestination:FolderB:"
--property strDest3 : " VolumeDestination:FolderC:"
--property strDest4 : "QLA_SuitCase:Misc:DisTiller Watched:<Email Address Goes Here>:"
--path to the folder you are watching
property strSource : " VolumeSource:FolderA:InComingFolder:"
property intWait : 600 --how long between checks
on idle
set lisFiles to list folder strSource without invisibles
if (count lisFiles) > 0 then --there are files
repeat with i from 1 to count lisFiles
set thisPath to (strSource & (item i of lisFiles)) as string
tell application "Finder"
try
repeat with i in {strDest1}
--duplicate file thisPath to folder (i as string) with replacing
move file thisPath to folder (i as string)
end repeat
on error err
end try
end tell
end repeat
else --nothing there? Check back in...
return intWait
end if
end idle
Gary Mielke
507.386.6394
Corporate Graphics Commercial
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden