Question Batch Copy a list of files? Xcopy doesn't work.

TorQueMoD

Distinguished
Aug 29, 2008
65
0
18,630
0
So I really thought this would be a lot easier to do... I have a list of files with their exact directory structure. For example: F:\Docs\Unreal Projects\Racer_Backup_2022_01_04\Content\Tropical_Jungle_Pack\FoliageType\FT_BushA_03.uasset

I want to copy every file in the list, to a new destination, keeping the folder structure intact. I thought I could use Xcopy, but apparently, it doesn't work. The best result I could get was SOME of the subfolders would be created, but ALL of the files would be placed into the root directory and NOT in their subfolders so every sub folder in the destination was just empty and it only grabbed some of the subfolders for whatever reason.

This was my Xcopy code for one of the 98 files I want to copy:
Code:
xcopy "F:\Docs\Unreal Projects\Racer_Backup_2022_01_04\Content\1_Project\Meshes\Prefabs\CharacterShowcase_PF.uasset" "F:\Desktop2020\ModifiedFiles\" /e /i
I thought this would create the folders: Docs\Unreal Projects\Racer_Backup_2022_01_04\Content\1_Project\Meshes\Prefabs\ in the destination, but it doesn't. At best it only goes back one subfolder. At worst, it doesn't even take the first subfolder.

Any idea of another program that can do this for me or a way to fix my Xcopy code?
 
Last edited:
I'd rather use RoboCopy for that, although I see no reason why your xcopy fails. You'll get full log, retry of failed copies etc.

Another problem you might be facing - some file names might fail beyond the magic 260 chars path length...
 

TorQueMoD

Distinguished
Aug 29, 2008
65
0
18,630
0
I'd rather use RoboCopy for that, although I see no reason why your xcopy fails. You'll get full log, retry of failed copies etc.

Another problem you might be facing - some file names might fail beyond the magic 260 chars path length...
Thanks guys for the help!
I decided it'd be easier to just manually copy everything. I realized I spent so much time getting Xcopy sorted out that I could have just done it all manually 3 or 4 times :p
 

ASK THE COMMUNITY

TRENDING THREADS