|
|
|
|
#1 |
|
Prospect
Join Date: May 2012
Posts: 1
|
Hi guys,
I've got a script that copies files from one folder to another based on a .txt file, which works perfectly... except I'd like for it to tell me what files (if any) have not been copied (ie. they probably were not in the folder to start with) - I've been trying to get it to put that information into a text file. I can create my text file ok (but, with nothing in it!), and copy the files ok, but am struggling to get them to work together. If possible, I'd also like for the dialogue at the end to tell me that it has copied x (number of files copied) of y (number of files in .txt file - not folder) Pretty new to applescript, so any suggestions would be appreciated! Thank you! My current script is as follows: set theTextItems to paragraphs of (read (choose file with prompt "Choose a list of files") as «class utf8») set theSourceFolder to (choose folder with prompt "Choose original art folder") as string set theDestination to (choose folder with prompt "Choose destination folder") repeat with thePDFName in theTextItems try set thePDFFile to (theSourceFolder & thePDFName) if thePDFFile = theSourceFolder then display dialog "Encountered an empty item" buttons {"OK"} else tell application "Finder" to duplicate alias thePDFFile to theDestination with replacing end if end try end repeat tell application "Finder" tell folder theDestination to set theCount1 to (count of items) as string end tell set theCount2 to (count of theTextItems) as string display dialog (theCount1 & " of " & theCount2 & " items copied to " & theDestination) buttons {"OK"} |
|
|
|
![]() |
| Tags |
| .txt, copy, error, file, missing |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|