回复 7# apang - @echo off
- set /p FileType=Please Input FileType:
- (for %%a in (c d e f g h i j k l m n o p q r s t u v w x y z) do (
- if exist "%%a:\" if /i not "%~d0"=="%%a:" (
- pushd "%%a:\"
- for /r %%b in (*.%FileType%) do call :a "%%b"&echo,%%b
- popd
- )
- ))>List.txt
- pause&goto :eof
-
- :a
- set "Name=%~nx1"&set /a m=0
- setlocal enabledelayedexpansion
- :Lp
- if exist "%~dp0%FileType%\%Name%" (
- set /a m+=1
- set "Name=%~n1(!m!)%~x1"
- goto :Lp
- ) else (echo,f|xcopy "%~1" "%~dp0%FileType%\%Name%" /y)>nul
复制代码 我改为可以手动输入文件类型。 |