I have a script to push files to an FTP server, but now need to generate new directories for the files. I found the following code, but I don’t have the syntax correct :
property ftpserverPath : "ftp://ftp.mycompany.com/" property ftpserverpathnewdir : "ftp://ftp.mycompany.com/new_dir/" do shell script ("curl --ftp-create-dirs -T " & ftpserverpathnewdir & " -u " & user_name & ":" & pass_word & ftpserverPath)
This generates the following error :
Finder got an error: curl: no URL specified!
curl: try ‘curl --help’ or ‘curl --manual’ for more information
- Do I have the ‘curl’ command correct?
- Where is the new directory name specified? In the variable?
Nb. The reason there’s a finder error is I have the other curl shell command inside finder tell to use a ‘repeat with’ statement to upload multiple files from a folder. (This part of the script works fine).
The goal of the script is to specify a local folder, login to the FTP server, create a new folder a current date string then transfer all the files in the local folder to the FTP folder.
Thanks in Advance.