Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xcopy not recognized as internal command in XP 1

Status
Not open for further replies.

markbanker

Programmer
Mar 6, 2001
37
US
I am trying to use xcopy in a batch file but it is not recognized as an internal or external command. I have tried to use the help feature 'help xcopy' and I get the same message.

Ideas?

Thanks,

Mark
 
If you start, run, cmd

and in the cmd window type xcopy /?

does it show you the help text?

It is a valid internal command under XP. It may be that the switches you are using are confounding it. Can you give an example of the batch line using xcopy you are attempting?

Also, see the freeware xxcopy utility:
 
I tried start, run, cmd and in the cmd window type xcopy /?

I still get the message that it is not recognized as an internal or external command.

Here is what I have in my batch file:

xcopy *.class %CATALINA_HOME%\webapps\ROOT\WEB-INF\classes /I /Q

Thanks for your help.

Mark
 
right-click My Computer, Properties, Advanced, Environmental Variables. In the lower box scroll to the "path" variable, and hit Edit. Does this variable start with exactly this? If not, edit it so that it does.

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
 
That was it, thank you. I must have accidentally deleted the environment variable.

Mark
 
Hi there

I know this post is from a while back but I am having exactly the same problem even though my Environment variables are correct.

The only way I can get any commands to work is to chang directory to the directory where the command is located.

Any ideas why the environment variables seem to be being ignored by the OS??

Cheers

 

Check your autoexec.bat and ensure 'path' isn't being set to another value.

If browsing using Windows Explorer, you may have to reveal it by going to Tools > Folder Options > View and changing the appropriate options. (i.e. 'Show hidden files and folders' and unchecking 'Hide protected operating system files')

Regards,
 
Very odd behavior.

Start, Run, cmd

Type "set"

Scroll the display and see what is in fact being set as the "Path=" values. It should be fully expanded showing a driver letter and legal path to \windows or \winnt, and the \system and the \system32.

type "sysedit"

Look to see if there are any .ini or configuration files that contain a path statement. It is possible a DOS program being loaded has overwritten these values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top