recursive move command on windows

前端 未结 6 1554
暖寄归人
暖寄归人 2021-02-14 15:25

I need to do a .bat copy of a .sh, I don\'t know much Windows cmd. On Linux I could do

mv ...

or

rsync -a SOURCE/ DEST/ --remov         


        
6条回答
  •  一向
    一向 (楼主)
    2021-02-14 15:45

    The move command can move directories as well as files.

    cd /d C:\sourceFolder
    rem move the files
    for %%i in (*) do move "%%i" C:\destinationFolder
    rem move the directories
    for /d %%i in (*) do move "%%i" C:\destinationFolder
    

提交回复
热议问题