Hi guys
I have a text file with full file paths, listed like this example below:
G:\folder\support_team\example.pdf
G:\folder2\work centre\example.docx
and so on.
I want to use this text file so I can copy these specific files to a destination folder on a different disk, keeping the folder structure. The files are coming from an external hard drive (plugged into a server via USB) and need to be copied over to a different disk in a folder of my choice which is on the local server.
These are a list of files where they exceeded Windows 255 character limit when I did a copy of data so I'm hoping a script will also bypass that limitation.
I was trying to a variation of the below:
set src_folder=c:\whatever\
set dst_folder=c:\whatever\
for /f %%i in (File-list.txt) DO xcopy /S/E/U "%src_folder%\%%i" "%dst_folder%"
But having 0 success and just getting errors in CMD. This is for a Windows OS environment.
Can anyone help me out please?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.