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

XCOPY overwrite problem

Status
Not open for further replies.

outonalimb

Technical User
Oct 7, 2003
454
GB
We use a batch file to XCOPY a file into a specific folder on each of our clients machines. Under NT4 Workstation, this process works fine (no prompt) but under Windows 2000 Pro, it always prompts for the user to overwrite the file. i.e. he or she must press Y on the keyboard for the copy to work.

The xcopy command we use is as follows:

xcopy \\apollo\netlogon\hosts %icetcp%\hosts

%icetcp% is an variable we configure in the autoexec.bat to map the path to the folder.

Does anyone know how I can force the overwrite of the file without any user interaction in Windows 2000 Pro?

I know about the /Y switch in 2000/XP but this switch doesn't exist under NT4.

Can anyone suggest a solution to this problem in my mixed NT4 and 2000 Pro environment?
 
You could delete the file before copying, eg

if exist %icetcp%\hosts del %icetcp%\hosts
xcopy \\apollo\netlogon\hosts %icetcp%\hosts
 
Use the "/y" switch on the command line for xcopy to avoid the prompts.
 

bcastner, the /y switch does not exist in the Windows NT 4 version of XCOPY. This is my problem.

Regards,
 
outonalimb,

The /Y switch is fully supported.
 
I apologize. No, the /Y does not exist for NT client, but it does for Win2k client on an NT server setting.

It is the client, not the server side that is ruling on this issue.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top