• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Moving large PDF files with Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Moving large PDF files with Applescript
      • From: Emmanuel Levy <email@hidden>
    • Copy files into /private/var/ with Applescript
      • From: Wenping Yang <email@hidden>
    • Re: Moving large PDF files with Applescript
      • From: Yvan KOENIG <email@hidden>
    • Re: Moving large PDF files with Applescript
      • From: "John C. Welch" <email@hidden>
    • Re: Moving large PDF files with Applescript
      • From: "email@hidden" <email@hidden>
  • Prev by Date: MacWorld Expo
  • Next by Date: Re: Moving large PDF files with Applescript
  • Previous by thread: MacWorld Expo
  • Next by thread: Re: Moving large PDF files with Applescript
  • Index(es):
    • Date
    • Thread