Windows batch command to move all folders in a directory with exceptions

后端 未结 7 2599
故里飘歌
故里飘歌 2021-02-19 18:03

I am trying to write a Windows Batch file that will allow me to move all directories within a given source directory into a target directory that exists within that source direc

7条回答
  •  臣服心动
    2021-02-19 18:40

    Robocopy (present in recent versions of windows or downloadable from the WRK) can do this, just use the /xd switch to exclude the target directory from the copy;

    robocopy c:\source\ c:\source\target\ *.* /E /XD c:\source\target\ /move
    

提交回复
热议问题