General discussion

Locked

running batch file

By joseph.hernandez ·
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

This conversation is currently closed to new comments.

8 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

File Associations

by haileyan In reply to running batch file

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.

Collapse -

by rgun2515 In reply to running batch file

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.

Collapse -

Why not?

by haileyan In reply to

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.

Collapse -

by iMpulse In reply to Why not?

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?

Collapse -

by rgun2515 In reply to Why not?

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.

Collapse -

Filename length

by Mark W. Kaelin Editor In reply to

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" did the trick.

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

Collapse -

by haileyan In reply to running batch file

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

Collapse -

by iMpulse In reply to

I'm with hailey here, what did it turn out to be?

Back to IT Employment Forum
8 total posts (Page 1 of 1)  

Related Discussions

Related Forums