ok, i have a folder named “FOLDER” which is located at c:\FOLDER
This folder contains another folder named “CONFIG” and a batch file “TEST.bat”
the TEST.bat has this code:
xcopy config C:\1/e/y/v/i/s
pause
This code runs properly and it does what i want to do ( copy CONFIG files to C:\1 )
But from microsoft’s website, it says that the syntax should be:
xcopy \config C:\1/e/y/v/i/s
pause
This code produces an error:
C:\FOLDER>xcopy \config C:\1/e/y/v/i/s
File not found – config
0 File(s) copied
C:\FOLDER>pause
Press any key to continue . . .
Is there something wrong with my computer?
I don’t know why i get error when I add “\” on the source.
I don’t want to specify the full path c:\folder\config because i want a batch file that will work regardless of the path of the directory “FOLDER“
C:\folder\> xcopy config\*.* C:\1 .
But that still doesn’t use the backslash.
After looking through both the MS-DOS User’s Guide and MS-DOS encylopedia, you can, however, specify the command like this:
C:\folder\> xcopy \folder\config C:\1
OR
C:\> xcopy \folder\config C:\1
Any of these will work.
(Same person, sorry, username troubles.)