Using xcopy with folders with spaces
Posted: 15 Dec 2018 12:08
Using xcopy with the code below. I have read you can put double quotes around the source and destination folder so that the folders with spaces can be treated correctly as a directory. However, when I use quotes around the path it shows an error: Invalid number of parameters
Where should I put the " around to make the above work?
Code: Select all
For /D %%K IN ("C:\This Folder") DO xcopy "%%K" "C:\Temp\test\backup001\%%~nK" /D /E /C /R /H /I /K /Y >>C:\Temp\test\backuplogs\backuplog.txt 2>&1