PDA

View Full Version : Problems running batch file under WinXP Pro


HartBreaker
05-17-2004, 04:43 PM
Can any one help me with this?

I’ve just written a batch file (.bat) to backup certain files and folders prior to recovering from a ‘Ghost’ backup. The batch file backs up folders like Favorites, all my emails, photos and documents. My problem is, when I double-click on the batch file, it now opens with Notepad. When I first wrote it (about six months ago) it use to execute.

If I un-associate the .BAT extension with Notepad, nothing happens! Can any one tell me how to get this working again?

I'm running Windows XP Pro.

Cheers,

Jessica

Zac
05-17-2004, 07:59 PM
You could try renaming it to a .com file to get it going, but anytime I have had problems with file associations like this I have ended up rebuilding. If you have a ghost image it might be easier for you to do the same.

QWERTY
05-19-2004, 02:28 AM
He means rename it to .CMD not .COM.


To fix the .bat file association open a command-prompt and type:

assoc.bat=batfile

The system should respond with .bat=batfile and then batch files should work correctly.

If that doesn't work then the problem isn't actually with the file association.

HartBreaker
05-19-2004, 08:24 AM
Hi QWERTY,

Tried all that. I managed to get the .BAT file to run. I had to re-associate it with MS-DOS prompt CMD.EXE. Renaming the extension didn’t work.

The problem I have now is the old DOS file format of 8.3. My batch file contains lines like:-
CD C:\Documents and Settings\JessicaHart\Local Settings\Application Data\Identities\{14D6969D-8522-490A-8279-6D68FCF27AEF}\Microsoft\Outlook Express\

Any idea how to get around this?

Jessica

richskie
05-19-2004, 11:07 AM
If you are going to be running it from within XP that shouldn't be a problem...

However you can view the 8.3 filenames by using DIR with the /X switch.

HartBreaker
05-19-2004, 01:54 PM
Thanks Richskie for that bit of information. I didn’t know I could do that. I’m now rewriting my entire batch file. I hope it works.

Cheers,

Jessica