Reputation: 47
I try to copy all files from a directory to FTP using curl, with the following command:
find Users/a/Desktop/Test/ -type f -exec curl -u ftpuser:ftppass --ftp-create-dirs -T {} ftp://ftps.pmc.com/Test/{} \;
And keep getting the following error:
FIND: Parameter format not correct
Alternatively, I try this command:
find Users/a/Desktop/Test/ -name '*' -type f -exec curl -u ftpuser:ftppass -T {} ftp://ftps.pmc.com/Test/ \;
And get this error:
File not found - '*'
Please share your suggestions on how to syntax the command correctly , or other suggestions on how to accomplish the need of copying all files in a directory using curl.
Thanks
Upvotes: 0
Views: 2653
Reputation: 522
Since you are on Windows OS, you cannot use Find and curl commands mentioned here to upload your files to FTP. To Upload files to FTP server using windows command prompt, you can follow the below steps:
ftp ftps.pmc.com
lcd Users/a/Desktop/Test/
Users/a/Desktop/Test/
local folder to the current folder on ftp one by one.So the list of command will be
1. ftp ftps.pmc.com
2. ftpuser
3. ftppass
4. cd test
5. lcd Users/a/Desktop/Test/
6. put *.txt (OR mput)
Upvotes: 2