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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xcopy acts strange behavor 1

Status
Not open for further replies.

Tianjin

Technical User
Nov 18, 2003
80
0
0
CA
I include a simple line
xcopy c:\test.txt c:\temp
in a batch file test.bat. File and folders in context are all exist. when I run this batch file through either double clicking batch file or typing batch file name in the command window, it gave me an infinite rolling screen with repeative text as below, So I have to use ctrl+c to terminate it. why?

C:\>xcopy c:\test.txt c:\temp\ /s /e

C:\>rem COPYIT.BAT transfers all files in all subdirectories of

C:\>rem the source drive or directory (c:\test.txt) to the destination rem drive
or directory (c:\temp\)

C:\>xcopy c:\test.txt c:\temp\ /s /e

C:\>rem COPYIT.BAT transfers all files in all subdirectories of

C:\>rem the source drive or directory (c:\test.txt) to the destination rem drive
or directory (c:\temp\)

C:\>xcopy c:\test.txt c:\temp\ /s /e

C:\>rem COPYIT.BAT transfers all files in all subdirectories of

C:\>rem the source drive or directory (c:\test.txt) to the destination rem drive
or directory (c:\temp\)
.........

thanks

tianjin
 
seems like you have an xcopy.bat or xcopy.cmd or similar
somewhere that's located higher up in your search path than the xcopy.exe
try explicitly adding the .exe
 
Thank you so much, JustinEzequiel.
As soon as I add .exe, my batch file run without problem.

TianJin
 
This is good news. With the old COMMAND.COM, any extension you put on the command name was totally ignored.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top