I am in the testing phase right now, so I am using local test source folders. The F:\xxcopy\NAS\FROM\ folder has (A,B,C,D,E - Z) subfolders, and within each letter folder there are specific client folders that will be listed in an input file: ClientFolders.txt.
Sample ClientFolders.txt
F:\xxcopy\NAS\FROM\I\INYONG*
F:\xxcopy\NAS\FROM\1-9\724REA*
The problem with the client folders is the name is composed of the client ID (i.e. INYONG, 724REA) which should be the first six characters of the folder name. After the folder name sixth character there is additional client descriptive text. So that is why I appended the "*" afterwards. The first six characters of the folder (Client ID) will always be unique.
I simply want the batch file to use the input text file that has the first six characters of folder names that need to be located and moved.
So I created the following batch file using xxcopy:
text-copy.bat
for /f "delims=" %%i in (ClientFolders.txt) do echo D|xxcopy "F:\xxcopy\NAS\FROM\%%i" "F:\xxcopy\NAS\TO\%%i" /SC /F /S /E /VL /YY /V /JV /RC /TTA0 /TCA /H /TCC /TCW /I /FW /oA:"F:\xxcopy\29MAR2016 TEST Folder\Logs\Test1.log" /oF3
The above log file reveals the following errors: Exit code 34 (illegal command parameter. Invalid destination directory name.
===============================================================================
XXCOPY Pro Edition ver 3.21.1 2016-03-29 18:44:40 Windows Ver 5.2.3790 Service Pack 2
Command Line = xxcopy "F:\xxcopy\NAS\FROM\F:\xxcopy\NAS\FROM\I\INYONG*" "F:\xxcopy\NAS\TO\F:\xxcopy\NAS\FROM\I\INYONG*" /SC /F /LTREE /VL /YY /V /JV /RC /TTA0 /TCA /H /TCC /TCW /I /FW /oA:"F:\xxcopy\29MAR2016 TEST Folder\Logs\Test1.log" /oF3
Invalid destination directory name
Directories Processed = 0
Total Data in Bytes = 0
Elapsed time in sec. = 0.000
Action speed (MB/min) = 0.0
Files Selected = 0
Log File Appended = "F:\xxcopy\29MAR2016 TEST Folder\Logs\Test1.log"
Exit code = 34 (Illegal command parameter)
===============================================================================
XXCOPY Pro Edition ver 3.21.1 2016-03-29 18:44:40 Windows Ver 5.2.3790 Service Pack 2
Command Line = xxcopy "F:\xxcopy\NAS\FROM\F:\xxcopy\NAS\FROM\1-9\724REA*" "F:\xxcopy\NAS\TO\F:\xxcopy\NAS\FROM\1-9\724REA*" /SC /F /LTREE /VL /YY /V /JV /RC /TTA0 /TCA /H /TCC /TCW /I /FW /oA:"F:\xxcopy\29MAR2016 TEST Folder\Logs\Test1.log" /oF3
Invalid destination directory name
Directories Processed = 0
Total Data in Bytes = 0
Elapsed time in sec. = 0.000
Action speed (MB/min) = 0.0
Files Selected = 0
Log File Appended = "F:\xxcopy\29MAR2016 TEST Folder\Logs\Test1.log"
Exit code = 34 (Illegal command parameter)