Skip navigation

JSI Tip 2496. COPY, XCOPY, and MOVE Overwrite Functionality Changes in Windows 2000.


CMD.EXE has been update to support overwrite warming control in the subject commands.


NOTE: If the COPYCMD environment variable is set to /Y,
      prompting is suppressed unless overriden by /-Y.
 
NOTE: The default is to prompt when replacing,
      unless the copy command is being executed from within a batch script.

MOVE \[/Y | /-Y\] \[drive:\]\[path\]filename1\[,...\] destination

  /Y                      Suppresses prompting to confirm you want to
                          overwrite an existing destination file.
  /-Y                     Causes prompting to confirm you want to overwrite
                          an existing destination file.


XCOPY source \[destination\] \[/A | /M\] \[/D\[:date\]\] \[/P\] \[/S \[/E\]\] \[/V\] \[/W\]
                           \[/C\] \[/I\] \[/Q\] \[/F\] \[/L\] \[/H\] \[/R\] \[/T\] \[/U\]
                           \[/K\] \[/N\] \[/O\] \[/X\] \[/Y\] \[/-Y\] \[/Z\]
                           \[/EXCLUDE:file1\[+file2\]\[+file3\]...\]

  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.


COPY \[/V\] \[/N\] \[/Y | /-Y\] \[/Z\] \[/A | /B \] source \[/A | /B\]
     \[+ source \[/A | /B\] \[+ ...\]\] \[destination \[/A | /B\]\]

  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.


  

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish