We are trying to copy all the files / sub-folders from a local directory to a NAS path.
The command executed is:
xcomtcp -c1 -f REMOTE_SYSTEM=$Server_IP PORT=8045 LOCAL_FILE=$localfolder REMOTE_FILE=$remotefile USERID=$lanid PASSWORD=$password FILE_OPTION=APPEND PROTOCOL=TCPIP SECURE_SOCKET=YES QUEUE=NO XTRACE=10
$localfolder = “E:\CA\XCOM\Config\HelpFiles\*”
$remotefile = “\\NAS\001_001$\testcopy\*”
Note: “testcopy” folder already exists on destination, as this will be the given path to the destination zone.
Have already tested setting FILE_OPTION as APPEND, CREATE, REPLACE with no luck.
What's the best option to APPEND if the file/sub-folder is already present on destination and if not CREATE a file / sub-folder during file transfer?
XCOM™ Data Transport® for Windows
Using FILE_OPTION=REPLACE should satisfy the requirements.
If the XCOM.GLB parameter on remote partner receiving the files is set to "CREATE_DIRECTORIES=YES" (the default value) and the local initiating system is sending:
===
$localfolder = “E:\CA\XCOM\Config\HelpFiles\*”
$remotefile = “\\NAS\001_001$\testcopy\*”
FILE_OPTION=REPLACE
===
then:
FILE_OPTION
Indicates how the transferred data is to be processed by the receiving system. For file transfers only.
Note: SUSPEND and RESUME are not supported for those transfers that are transferring multiple files with the use of the * wildcard character.
=====
The above information is from XCOM for Windows documentation pages for FILE_OPTION and CREATE_DIRECTORIES
XCOM DATA TRANSPORT FOR WINDOWS 11.6 SERVICE PACKS > Reference > List of Parameters > FILE_OPTION
XCOM DATA TRANSPORT FOR WINDOWS 11.6 SERVICE PACKS > Reference > List of Parameters > CREATE_DIRECTORIES
XCOM DATA TRANSPORT FOR WINDOWS 12.0 > Reference > List of Parameters > FILE_OPTION
XCOM DATA TRANSPORT FOR WINDOWS 12.0 > Reference > List of Parameters > CREATE_DIRECTORIES