Hi everyone,
I try to do a folder action, which uploads every file to a ftp-server, even if the files are in nested folders, after upload the files should be deleted. I did several tests with "URL Access Scripting", and with "curl" but I wasn't succesfull :(
Could you give me hint, how I could handle this?
Alex
set ftp_path to "" set ftp_name to "username" set ftp_pw to "password" set ftp_server to "ftp.dummy.com"
set ftp_connection to "ftp:///" & ftp_name & ":" & ftp_pw & "@" & ftp_server & ftp_path
on adding folder items to this_folder after receiving these_files
tell application "URL Access Scripting" try repeat with i from 1 to number of items in these_files set this_file to item i of these_files upload this_file to ftp_connection
--do shell script "curl -t " & this_item & "'ftp_connection'" end repeat end try end tell
tell application "Finder" set the target_file to (delete this_file) -- PROCESS THE ITEM process_item(target_file) end tell
end adding folder items to
|