Discussion Locked

running batch file

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi

I have been using a simple batch file to run backups of my users files on their hard drives. It is kept on a shared network drive. The file is a copy of a basic one that we wrote and all I do is modify if for each user. For all but one user it runs correctly. For this one user when I double click on the file it opens in the editor instead of running. This also happens if i high light it and hit return or if I run it from from run box.

Any ideas will be appreciated.

thanks

Joe

8 replies

by haileyan

Open up my computer and go to => Tools => Folder Options and click on the File Types tab. Make sure that NotePad is not associated with .BAT files. In fact, if there is any entry for .BAT file extension deleted it.

by rgun2515

I don't think it's a File Associations issue If runs for all but one user. Post one that runs and one that does not. One thing to check is if you are running them from shortcuts and you saved the one that doesn't run as a .txt file. If that is not it, post and I will be happy to take a look.

by haileyan

You think all his users use the same computer? Try creating another simple batch file that contains just the pause command. Double-click this file and see if it executes or opens in a text editor. If it opens in a text editor it is a file association problem.

If it executes just fine it most definitely could be that you left the file extension as txt. Although I automatically give you more credit than than.

by impulse

You slightly modify the batch file for each user's use.. I don't suppose you have the word "Edit" somewhere in that batch file do you? ;)

by rgun2515

Read it again...

"The file is a copy of a basic one that we wrote and all I do IS MODIFY IT FOR EACH USER. For all but one user it runs correctly."

It is very possible he saved it as a text file. It's a honest mistake.

by Mark W. Kaelin

I experienced some unexpected behavior in a batch file recently because the user's name was too long. Putting the user's name (which was used as a directory name) into [i["quotes"[/i] did the trick.

May not apply to your situation, but then again it might. ;)

by haileyan

Hell, I am just curious if the problem is fixed. I hate it when people post and never return.

This discussion is closed to new replies.