Batch file to copy files from one folder to another folder

前端 未结 9 1647
臣服心动
臣服心动 2020-11-29 15:07

I have a storage folder on a network in which all users will store their active data on a server. Now that server is going to be replaced by a new one due to place problem s

9条回答
  •  余生分开走
    2020-11-29 15:39

    @echo off
    
    rem The * at the end of the destination file is to avoid File/Directory Internal Question.
    
    rem You can do this for each especific file. (Make sure you already have permissions to the path)
    xcopy /Y "\\Oldeserver\storage\data\MyFile01.txt" "\\New server\storage\data\MyFile01.txt"*
    pause
    
    rem You can use "copy" instead of "xcopy "for this example.
    

提交回复
热议问题