/exclude in xcopy just for a file type

后端 未结 4 1210
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 16:05

I have a batch file to copy over files from Visual Studio to my Web folder. I want to copy all files in my web project, EXCEPT for *.cs files. I can\'t seem to get this to

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 16:46

    For excluding multiple file types, you can use '+' to concatenate other lists. For example:

    xcopy /r /d /i /s /y /exclude:excludedfileslist1.txt+excludedfileslist2.txt C:\dev\apan C:\web\apan
    

    Source: http://www.tech-recipes.com/rx/2682/xcopy_command_using_the_exclude_flag/

提交回复
热议问题