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:

@echo off

rem Make sure working on the C: drive
C:

rem Set the working directory to C:\program files\activision\call of duty 2\1.2
cd "C:\program files\activision\call of duty 2\1.2"

rem Tells the user that the CoD2MP_s.exe file is being copied
echo Copying CoD2MP_s.exe...

rem Copies the CoD2MP_s.exe file to C:\program files\activision\call of duty 2
copy CoD2MP_s.exe "C:\program files\activision\call of duty 2" /Y

rem Tells the user that the iw_15.iwd file is being copied
echo Copying iw_15.iwd...

rem Copies the iw_15.iwd file to C:\program files\activision\call of duty 2\main
copy iw_15.iwd "C:\program files\activision\call of duty 2\main" /Y

rem Keeps the screen open so that you can see the results
pause

Download this code: Set-1.2.bat

@echo off

rem Make sure working on the C: drive
C:

rem Set the working directory to C:\program files\activision\call of duty 2\1.3
cd "C:\program files\activision\call of duty 2\1.3"

rem Tells the user that the CoD2MP_s.exe file is being copied
echo Copying CoD2MP_s.exe...

rem Copies the CoD2MP_s.exe file to C:\program files\activision\call of duty 2
copy CoD2MP_s.exe "C:\program files\activision\call of duty 2" /Y

rem Tells the user that the iw_15.iwd file is being copied
echo Copying iw_15.iwd...

rem Copies the iw_15.iwd file to C:\program files\activision\call of duty 2\main
copy iw_15.iwd "C:\program files\activision\call of duty 2\main" /Y

rem Keeps the screen open so that you can see the results
pause

Download this code: Set-1.3.bat

Hopefully these files are pretty self explanatory with all of the remarks (rem lines).

Similar Posts:

If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?