稍微修改了下,应该符合lz要求了这一次
- @echo off
- setlocal enabledelayedexpansion
- :bof
- cls
- title %time%%date%
- set /p myFolder=[把需要整理的文件夹拖到这里并按Enter]:
- if not exist %myFolder%\ goto bof
- call :sortFolder %myFolder%
- echo 整理完毕,按任意键退出.
- pause>nul
- exit
- :sortFolder
- set mp3Count=0
- pushd "%~1"
- if not exist e:\music\mp3\nul md e:\music\mp3
- cd.>mp3List.txt
- cd.>copyList.txt
- title ^>^>^>Searching mp3 files in %~1...^<^<^<
- for /f "delims=" %%a in ('dir /s /b /a-d *.mp3') do (echo %%a#%%~ta>>mp3List.txt)
- title ^>^>^>Creating filtered mp3 list. ^<^<^<
- type mp3List.txt | find "2010" >>copyList.txt
- title ^>^>^>Copying mp3 files^<^<^<
- for /f "delims=#" %%a in (copyList.txt) do (set /a mp3Count=!mp3Count!+1 &&title Total Copied: [!mp3Count!]&& echo Copying [%%~a] && copy "%%~a" e:\music\mp3\ >nul )
- del copyList.txt >nul 2>nul
- del mp3List.txt >nul 2>nul
- exit/b
复制代码
[ 本帖最后由 TX_kakashi 于 2010-8-10 21:14 编辑 ] |