本帖最后由 smss 于 2021-2-24 17:32 编辑
- @Echo off&SetLocal EnableDelayedExpansion&if "%~1"=="" echo 拖拽目标至%~n0即可&ping 0 -n "3">nul&exit
- set "X=%~a1"&set F=%date:~5,2%%date:~8,2%总文件夹&if not exist %~dp0!F! md %~dp0!F!
- if "!X:~0,1!"=="d" (xcopy /ciserh "%~1" "%~dp0!F!\%~n1"&goto A)else (set /p Y=把该文件放入如"大军"和"大宝"的文件夹中请输文件夹名:
- if not exist "%~dp1!F!\!Y!" md "%~dp1!F!\!Y!"
- copy "%~1" "%~dp1!F!\!Y!\%~nx1")
- :A
- echo 复制完毕!&ping 0 -n "2">nul&exit
复制代码
- @Echo off&SetLocal EnableDelayedExpansion&if "%~1"=="" set /p X=拖拽目标至%~n0回车确认即可
- set F=%date:~5,2%%date:~8,2%总文件夹&if not exist %~dp0!F! md %~dp0!F!
- set /p Y=把该文件放入!F!下指定文件夹:
- if not exist "%~dp1!F!\!Y!" md "%~dp1!F!\!Y!"
- copy "%~1" "%~dp1!F!\!Y!\%~nx1"||xcopy /ciserh "%~1" "%~dp0!F!\!Y!\%~n1"
- echo 复制完毕!&ping 0 -n "2">nul&exit
复制代码
|