VS PostBuild Event - Copy file if it exists

后端 未结 3 1023
情深已故
情深已故 2021-02-18 13:57

Is there a simple way to copy a file in a post-build event for a Visual Studio project, but only if the file exists? (i.e. don\'t fail the build if the file doesn\'t exist)

3条回答
  •  伪装坚强ぢ
    2021-02-18 14:09

    Also without the IF EXIST but using the /U option of XCOPY

    xcopy source_file_name dest_folder /u /y
    

提交回复
热议问题