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).

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

Hard DriveIn one of the comments on Providing User Feedback In AutoIt, Jim is wondering how you can map drives:

I was wondering though, can autoit make an executable that would setup a permanent drive map. Instead of a non-technical user mapping a drive, the executable file would setup a predefined mapped drive. That would be cool..
Thanks
Jim

Well, Jim, there are several different ways that you can map drives but two of the easiest are using a batch file or through AutoIt. Now I know that you can’t make a batch file into an executable but I thought that I would show you how todo this anyway.

Our Example

For this post, I want to use an example to help clarify these concepts. For our example, we would like to map drive letter T: to network share \\server\share.

Batch File

To map a drive in a batch file, simply use the net use command. So, for our example, we would use:

net use T: \\server\share

If you want the drive mapping to return each time you reboot, add the /persistent:yes option:

net use T: \\server\share /persistent:yes

AutoIt

In AutoIt, you use the DriveMapAdd command. Our example would look like this:

DriveMapAdd("T:","\\server\share")

To allow it to survive a reboot, add one more option:

DriveMapAdd("T:","\\server\share",8)

That’s all there is to it. You can then compile this into an executable and away you go!

Hope that answers your question, Jim

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

NetmeetingFor many of us, we live and die by Windows Netmeeting. Yet, when you look at a base Windows XP installation, it is nowhere to be found. To rectify this problem, simply perform the following steps in order:

  1. Go to Start→Run…
  2. In the Run box type, conf and press OK.

You can now configure Netmeeting the way you like it. I have to admit that is is probably the shortest tip that I have ever posted but it is a much needed one

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

Registry EditorThe registry is the nerve center of the Windows computer system. It contains extensive information about how your system works and the way that it is set up. So, if something were to go wrong with your system and the registry becomes damaged, it would be good to have some of those setting readily available on case you need to recover them.

One really easy way of backing up select information in the registry is exporting that information using the Registry Editor that comes with Windows. This is a relatively easy process that can save you a lot of time and effort.

For our example, let’s assume that we are working with the programs that start automatically when we start the computer. We want to be sure that we don’t mess up these registry entries so we want to back up the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key. To do this, we would perform the following steps.

  1. Start the Registry Editor by going to Start→Run…, typing in regedit and then clicking the OK button.
  2. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key and click on it.
  3. Under the File menu, click on Export…
  4. Save the file as Startup.reg on the desktop.

You have successfully saved the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key as Startup.reg.

The Startup.reg file is actually just a text file and you can open it up in notepad to see what iis in it. If you want to add these registry settings back into your registry, simply right-click on the Startup.reg file and select Merge.

Note: When you merge a registry file back into the registry, it will overwrite any settings that are in that registry key. Use with caution!

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

Clean Manager OptionsIt is really easy for your computer system to get full of junk. This is one reason why people often notice that their computer system seems to be slowing down.

This post will show you how to set up the built-in disk cleanup program in Windows to perform a deep clean of your system so that it will run quicker.

Configure the Disk Cleanup Program

The first step is to get the disk cleanup program to free up as much free space as it possibly can. Follow these steps:

  1. Go to Start→Run… and type in cleanmgr /sageset:99
  2. You should now see the Disk Cleanup Settings window. In this window, check off all of the options. Once you have done this, click on the OK button.

Your cleanup manager is now ready to perform a deep clean.

Performing a Deep Clean

To run the deep clean, simply follow these steps:

  1. Go to Start→Run… and type in cleanmgr /sagerun:99
  2. The disk cleanup program will now run. It will close automatically when it is finished.

The deep clean may take some time the first time that it runs but if you run this on a regular basis, then you will find that this process becomes quicker each time.

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

« Previous PageNext Page »