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?

 
Howdy,

Add /y on the end so yur line would be :

Code:
xcopy \\apollo\netlogon\hosts %icetcp%\hosts /y

To list all the switches for a given command just type the command and add /? on the end eg. :
Code:
xcopy /?

Hope this helps

TSSTechie

[lightsaber] May The Force Be With You [trooper] [yoda]
 
xcopy \\apollo\netlogon\hosts /i/d/f/h/r/k/s/e/v/y %icetcp%\hosts

Will overwrite if newer, verify, create and all that.

Marc
If 'something' 'somewhere' gives 'some' error, expect random guesses or no replies at all. Please specify details.
Free Tip: The F1 Key does NOT destroy your PC!
 

Thanks for that. I can't believe I didn't use the /? help!!!

Regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top