且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

防止使用cmd覆盖文件(如果存在)

更新时间:2023-12-02 18:07:52

使用如果不存在"代码中文件夹的完整路径.然后,您甚至都不需要CD:

Use the FULL path to the folder in your If Not Exist code. Then you won't even have to CD anymore:

If Not Exist "C:\Documents and Settings\John\Start Menu\Programs\SoftWareFolder\"