Running Batch file in XP Pro

  • Thread starter Thread starter Kim_Arlington
  • Start date Start date
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!
 
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....
 
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.
 
Back
Top