Here's an interesting tip from Simon Sheppard for those scripts that need to XCOPY files in both Windows NT 4 and 2000:
From: email@example.com (Simon Sheppard) Newsgroups: alt.msdos.batch.nt Subject: Re: XCOPY in batch NT4/Win2000 On Wed, 1 Aug 2001 10:26:19 -0400, Rick Charnes <firstname.lastname@example.org> wrote: >I've just heard that under Win2k XCOPY defaults to 'prompt to overwrite >each file' and a /Y switch will suppress prompting, whereas under NT4 it >defaults to 'automatically overwrite each file' and /Y is not a valid >switch. Boy, does this complicate batch files that need to run under >both OS's. Can anyone confirm this? Any tips for dealing with this >problem? Yes I can confirm this The workaround is to use the COPYCMD env variable set COPYCMD=/Y This will turn off the prompt in Win2000 and will be ignored by NT4 http://www.ss64.com/nt/xcopy.html - Simon Sheppard Web: http://www.ss64.com email: Simon@ "
|page last uploaded: 2017-07-06, 12:36|