I am using Core FTP Server build 321 on a Win XPP SP3 machine. I have a single SFTP domain.
I have the folder structure:
d:\users\user1\sub1 ..\sub2 etc
Permissions on the home folder 'user1' are RWAD-LCRI
I can successfully manually add, remove, rename and delete files.
I would like to
a. move a file from sub1 to sub2
b. copy a file from sub1 to sub2
c. rename file.ext1 to file.ext2
For a. I placed the following command into the "Post upload command" field on the Script/commands tab for user1
cmd.exe /c move /y %1 %2\..\sub2
with return code 0, but nothing happens when I upload a file to folder sub1. The last entry in the log is the upload of the file.
If instead, I change the command to
cmd.exe /c move /y %1 %2\sub2
and upload a file to the root home folder, it works and the file is moved to the sub2 folder.
Finally, are there any other available variables besides just %1 (current file) and %2 (current path)?
Thanks in advance for any help.
Tomi
How to rename, copy and move uploaded files
(I am now using build 323)
The info on the scripts page says that
%1 = current (file) name
%2 = current path
Nothwithstanding that, I have tried all the options you gave, both in a simple command line on the scripts page as well as in a bat file but none of them work.
Can the CoreFTP Server team please test and advise which is the correct syntax (there should only really be one correct syntax)?
I also found that I had to restart the CoreFTP Server in order to get the changes to the command line on the scripts page to work.
Thanks, Tomi
The info on the scripts page says that
%1 = current (file) name
%2 = current path
Nothwithstanding that, I have tried all the options you gave, both in a simple command line on the scripts page as well as in a bat file but none of them work.
Can the CoreFTP Server team please test and advise which is the correct syntax (there should only really be one correct syntax)?
I also found that I had to restart the CoreFTP Server in order to get the changes to the command line on the scripts page to work.
Thanks, Tomi