I know this is a stupid question I've made batch files for years and haven't had this much trouble… I'm trying to make a batch file to copy files into a folder and for the life of me I can't get it to work.
cd C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\
copy FifthGenerationMage.bsa C:\Users\Mark Collins\Desktop\DATA
copy FifthGenerationMage.bsl C:\Users\Mark Collins\Desktop\DATA
copy FifthGenerationMage.ckm C:\Users\Mark Collins\Desktop\DATA
copy FifthGenerationMage.esp C:\Users\Mark Collins\Desktop\DATA
pause
This should work, right? Copy , right? When I do it like this, it says the syntax is incorrect.
When I do this:
copy C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\FifthGenerationMage.bsa C:\Users\Mark Collins\Desktop\DATA
copy C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\FifthGenerationMage.bsl C:\Users\Mark Collins\Desktop\DATA
copy C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\FifthGenerationMage.ckm C:\Users\Mark Collins\Desktop\DATA
copy C:\Program Files (x86)\Steam\SteamApps\common\Skyrim\Data\FifthGenerationMage.esp C:\Users\Mark Collins\Desktop\DATA
It says "The System cannot find the file specified."
Both of those should work. I don't get it.
Best Answer
If your path contains spaces - you have to enclose whole path with
"
, like this:I would also suggest to use variable to store target path and simplify script:
Why it doesnt work?
Look:
System reads it as:
1 - parameter 1 (for copy command - source 1)
2 - parameter 2 (for copy command - source 2)
3 - parameter 3 (for copy command - source 3)
4 - parameter 4 (for copy command - source 4)
5 - parameter 5 (for copy command - target)
There are no
C:\Folder
,with
,spaces\file.txt
files or directories - and you get error: