get Applescript to act on a file once it has been downloaded
get Applescript to act on a file once it has been downloaded
- Subject: get Applescript to act on a file once it has been downloaded
- From: William Adams <email@hidden>
- Date: Fri, 11 Jul 2014 10:15:34 -0400
I'm downloading a file w/ the command:
set newfile to "/Volumes/FIS/Customer/CLIENTNAME/2015_Ads/Test/" & newFileName & ".eps"
set download_path to "ftp://" & ftpUserName & ":" & ftpPassword & "@" & ftpHost & "//" & "o7/" & ftpSubDirectory & "/" & ftpSourceDirectory & "/" & originalFileName & ".eps"
do shell script "curl -o " & quoted form of newfile & " " & quoted form of download_path
and the file downloads fine.
Attempting to access it as an alias the fails though, and trying to get the script to wait for the file to appear using:
tell application "Finder"
activate
repeat while not (exists POSIX file newfile)
delay 0.5
end repeat
end tell
results in an endless repeating of:
exists POSIX file "/Volumes/FIS/Customer/CLIENTNAME/2015_Ads/Test/BT150453.eps"
--> false
exists POSIX file "/Volumes/FIS/Customer/CLIENTNAME/2015_Ads/Test/BT150453.eps"
--> false
Even though I can see the file in Finder.
How does one get Applescript to:
- wait for a file to be downloaded completely
- act on the file once it is present (I need to copy it to a folder, then re-upload it under a new name)
William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
_______________________________________________
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