SUPPORT > TIPS
Send us a question or comment

   

Using The SecureFX® SFXCL Move Command

The SFXCL command-line utility 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 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

You can find more information on using the SFXCL command-line utility in the SFXCL Command-Line Tool for SecureFX FAQ.

Was this information helpful?
Yes No
Thank you!
Send your comments and questions to VanDyke Software Support,
or join the discussion in the VanDyke Software Forums.
Can't find the answer you're looking for?
Ask VanDyke Software Support directly
and we will get back to you as soon as possible.
1.  Read or download one of our secure solutions white papers. 2.  Download a free
30-day evaluation copy of our products.
3.  Let us help define the right Secure Shell solution for your company. 4.  Subscribe to our What's New page for tips, solution ideas, and product news.