Running Batch file in XP Pro

K

Kim_Arlington

I am encountering this problem when running batch file in XP Pro. The
problem is not consistent.

I created a batch file and contains only a simple command: dir. The
error I am getting is:

'¦d' is not recognized as an internal or external command,
operable program or batch file.

It seems like it always parses the first character of the first command
in the batch file and then errored out with the above message. As I
have said, I could create another batch file with another name and it
will work fine.

The environment variables seem to be ok.

Any help is appreciated!
 
B

billious

I am encountering this problem when running batch file in XP Pro. The
problem is not consistent.

I created a batch file and contains only a simple command: dir. The
error I am getting is:

'¦d' is not recognized as an internal or external command,
operable program or batch file.

It seems like it always parses the first character of the first command
in the batch file and then errored out with the above message. As I
have said, I could create another batch file with another name and it
will work fine.

The environment variables seem to be ok.

Any help is appreciated!

---------------------------

I'd suggest that you have a clashing filename.

The name of the batch you are using (the one containing the "dir" command)
is the same as another executable (probably a batch, given the message) on
the path.

If you start in the directory containing YOUR batch, that will be executed.
If you start in some other directory, whatever executable is found first on
the path will be excuted. Consequently, the behaviour varies depending on
the directory to which you are logged in.

Theory only. Would probably have been quicker to post your batch and tell us
its name....
 
M

Mark Blain

I am encountering this problem when running batch file in XP Pro. The
problem is not consistent.

I created a batch file and contains only a simple command: dir. The
error I am getting is:

'¦d' is not recognized as an internal or external command,
operable program or batch file.

It seems like it always parses the first character of the first command
in the batch file and then errored out with the above message. As I
have said, I could create another batch file with another name and it
will work fine.

The environment variables seem to be ok.

Any help is appreciated!

Open your batch file in Notepad and do a File, Save As. Make sure you save
it with encoding "ANSI" and not Unicode. Now it will run properly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top