Note: This tip is for use with SecureFX for Windows.
The SFXCL command-line utility that is included in SecureFX for Windows allows you to perform tasks from the command line. The utility recognizes general command-line instructions, as well as the additional QuickSync option that requires a specific syntax.
If you are using SecureFX 4.x for Windows and later, you can use the /Move flag in the SFXCL command-line utility to transfer and delete files in one step. The /Move option will transfer the specified files and then delete the successfully moved files from the source directory. You can also specify passwords on the command line.
Here is an example using of using the /Move option to transfer all .txt files from a remote server to a local server:
sfxcl /move sftp://user1@remoteserver/*.txt sftp://user@localserver/C:/
You can also specify the passwords for each server on the command line (the command below should appear on one line):
sfxcl /move sftp://user1:pass@remoteserver/*.txt sftp://user:pass@localserver/C:/
To move a file from one folder to another on the remote server, and to save the bandwidth related to downloading the file locally and then uploading the file, you can use the /Rename command. /Rename issues a rename command on the remote, similar to the UNIX 'mv' command.
In this example, the command will move the file from the "c:" root to the "temp:" root defined in VShell or other Secure Shell server:
sfxcl /rename sftp://user:pass@remoteserver/c:/test.txt temp:/test.txt
To move a file between folders in the same root, in this case to the "otherfolder" directory, you would use the command:
sfxcl /rename sftp://user:pass@remoteserver/c:/test.txt /otherfolder/test.txt
To rename the file, you would use the command:
sfxcl /rename sftp://user:pass@remoteserver/c:/test.txt /otherfolder/newfile.txt
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.