- @echo off & cd /d "%~dp0"
- if not exist "%~1" ( echo 拖动文件到图标上 & pause&exit)
- set "index=1"
- if not exist "%~dp1%~n1 - 副本%~x1" ( copy /y "%~1" "%~dp1%~n1 - 副本%~x1" & exit)
- :loop
- set /a "index+=1"
- if exist "%~dp1%~n1 - 副本 (%index%)%~x1" goto :loop
- copy /y "%~1" "%~dp1%~n1 - 副本 (%index%)%~x1"
复制代码
|