Tech Request: Batch File Copy
Andrew is looking for a batch file that will copy some files for him.. Andrew writes:
I recently developed a way to allow Call of duty 2 to run in both the 1.2 and 1.3 version. The problem is, the people i’m trying to solicit to don’t understand english well, so i need to make a batch or executable to move two files in onew folder to two seperate folders. the folders are specifically: “C:\program files\activision\call of duty 2\1.2″ & “1.3″ In both “1.2″ and “1.3″, are two files: “CoD2MP_s.exe” and “iw_15.iwd”. basically, the only difference in the two versions are these two files.
So i need a batch to move the “CoD2MP_s.exe” into “c:\program files\etc…\call of duty 2\” and “iw_15.iwd” into another folder, “main”, under “call of duty 2″. basically, one batch file to move the 1.2 version files into the two folders, and another batch to move the 1.3 version files in those two folders.
I have no experience in programming, so i need as much help as i can get.
So, Andrew, if I understand you correctly, you have the folder:
C:\program files\activision\call of duty 2
In that folder, you have three folders:
C:\program files\activision\call of duty 2\1.2
C:\program files\activision\call of duty 2\1.3
C:\program files\activision\call of duty 2\main
You also have CoD2MP_s.exe in this folder.
Under C:\program files\activision\call of duty 2\1.2 and C:\program files\activision\call of duty 2\1.3, you have the two files CoD2MP_s.exe and iw_15.iwd.
What you are trying to do is create two batch files, one to activate version 1.2 and one to activate version 1.3. To do this, each batch file would copy CoD2MP_s.exe to C:\program files\activision\call of duty 2 and iw_15.iwd to C:\program files\activision\call of duty 2\main from their respective directories.
Luckily, this is a relatively easy thing to accomplish with a batch file. All we need to do is use the copy command and tell it where to copy the files to.
Here are the two batch files that I came up with:
[syntax,Set-1.2.bat,batch]
[syntax,Set-1.3.bat,batch]
Hopefully these files are pretty self explanatory with all of the remarks (rem lines).
One Response to “Tech Request: Batch File Copy”
-
Barry Says:
April 4th, 2008 at 10:46 amThat was useful, but I have a harder one for you. How can I create a batch file that copies certain file. Please email me and I will be happy to reply with my question in detail. It does concern copying files from one folder to another; but I need to copy a only the files that are flagged in the XML for something specific. But, I need the other two file types associated with that .xml file. So, I need to copy every flagged file, times 3. Please help and I will break it down.
