troubleshooting Question

xxcopy batch file to move specific client folders using an input text file.

Avatar of cmp119
cmp119Flag for United States of America asked on
Microsoft DOSWindows BatchScripting Languages
21 Comments1 Solution3556 ViewsLast Modified:
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)
ASKER CERTIFIED SOLUTION
NVIT
End-user support

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 21 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 21 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros