How to Copy a Folder and Subfolders to Multiple Clients with Sysax FTP Automation?
March 6th, 2014 by Rossy GuideInstructions
Folders and sub folders can be copied using the ftpcopylocal command. The item identified by the source name is copied to the specified destination path. The ftpresult
predefined status flag is set to the predefined constant success
if the command completed successfully.
Syntax:
ftpcopylocal <source name>, <destination path>;
|
Example:
ftpcopylocal "dw_folder", "C:\\backup"; #copy a folder ftpcopylocal "dw_folder\\sub_folder", "C:\\backup\\sub"; #copy the sub folder |
Steps:
v Connect the server for a connection with multiple clients.
v All the clients are to be configure in script successfully.
v Script can be written as follows.
v Run the above script
v Copied a folder and subfolders to multiple clients with Sysax ftp automation successfully.
ftpconnect "intel", 21, "acc1", "pass1"; ftpsetpath local "D:\\local1"; ftpcopylocal "1", "C:\\backup\\a1"; if ftpresult eq success begin print " status: pass"; end else begin print " status: fail"; end ftpconnect "intel", 21, "acc2", "pass2"; ftpsetpath local "D:\\local2"; ftpcopylocal "2", "C:\\backup\\a2"; if ftpresult eq success begin print " status: pass"; end else begin print " status: fail"; end ftpconnect "intel", 21, "acc3", "pass3"; ftpsetpath local "D:\\local3"; ftpcopylocal "3", "C:\\backup\\a3"; if ftpresult eq success begin print " status: pass"; end else begin print " status: fail"; end |