Multiple Renaming of Files using Curl Command
I have multiple files in a folder. My requirement is to transmit them all in one go and then rename on ftp server. I cant rename before tranmitting. Server accepts only in .lnk format and then we rename it to .dat format.
When i try to upload a single file it works fine like
curl -T file1 --ftpaddress --user username: password
When i try to upload and rename a single file it works fine
curl -T file1 --ftpaddress --user username: password -Q "-RNFR file1" -Q "-RNTO -newfilename"
When i try to do bulk upload it works fine like this
curl -T "{file1,file2}" --ftpaddress --user username: password
But I am unable to rename multiple files (Even single file) when i try to rename them. Ma command fails with message that Quoted string not accepted
curl -T "{file1,file2}" --ftpaddress --user username: password -Q "-RNFR file1" -Q "-RNTO -newfilename" (fails: file do get transmiited but for rename it says quoted string not accepted)
curl -T "{file1,file2}" --ftpaddress --user username: password -Q "-RNFR file1" -Q "-RNTO -newfilename" -Q "-RNFR file2" -Q "-RNTO -newfilename2" (fails: file do get transmiited but for rename it says quoted string not accepted)
The curl man page says i can give series of command using -Q i am sure it does mutliplel renaming of files when i transfer multiple files. I am sure I am making a syntax mistake. If some body can help i will really appreciate. Many thanks
Regards
ARKAM
|