I would like to know what the context is for the exists command in Transmit.
My goal is to connect to my ftp site and look in the root directory for a specific file. If it is there delete it.
Then another script runs some commands on my server. When that is done I want another script to run
with transmit to check for a specific file and download it.
Basically I am thinking that the exists command is what I need to use, but I do not know for sure.
I have looked through the dictionary and the context is very vague.
Thanks,
Carl
Model: MacBook Pro Core i7
AppleScript: 2.1.2
Browser: Safari 533.18.5
Operating System: Mac OS X (10.6)
I use transmit to download a file every 30 minss, After downloading I delete the file.
--set theServerAddress to "YourServerAddress"
--set theUserName to "YourUserName"
--set thePassword to "YourPassWord"
tell application "Transmit"
set SuppressAppleScriptAlerts to true
set theDocument to make new document with properties {name:theServerAddress}
tell theDocument
tell current session
connect to theServerAddress as user theUserName with password thePassword
end tell
end tell
end tell
try
tell application "Transmit"
set SuppressAppleScriptAlerts to true
tell document 1
tell current session
download item "ABC.txt" with resume mode replace
end tell
end tell
end tell
tell application "Transmit"
set SuppressAppleScriptAlerts to true
tell document 1
tell current session
delete remote item "ABC.txt"
end tell
end tell
end tell
tell application "Transmit"
set SuppressAppleScriptAlerts to true
quit
end tell
end try
What version of Applescript are you using? I had to change that script quite a bit to get it to compile.
tell application "Transmit"
set SuppressAppleScriptAlerts to true
tell document 1
download item at path "ABC.txt" with resume mode replace
end tell
end tell
tell application "Transmit"
set SuppressAppleScriptAlerts to true
tell document 1
delete item at path "ABC.txt"
end tell
end tell
tell application "Transmit"
set SuppressAppleScriptAlerts to true
quit
end tell
Also, what would I do if I just wanted to grab files with the filename ending with abc? Say ***abc.txt? Or *************abc.txt? No matter how many characters are in front of the abc.