@echo off&setlocal enabledelayedexpansion
cd\
for /f "delims=" %%i in ('dir /s /b %cd%不说爱你\*.ts') do (
set /a n+=1
move /y "%%i" %cd%
ren "%%~nxi" 不说爱你!n!.ts
)
echo 搞定!
pause>nul
[ Last edited by zw19750516 on 2008-5-23 at 10:02 PM ]
作者: 26933062 时间: 2008-5-23 21:57
呵呵、楼上是把当前分区下的所有ts文件都移出来了啊。。
作者: bat-zw 时间: 2008-5-23 22:03
Originally posted by 26933062 at 2008-5-23 21:57:
呵呵、楼上是把当前分区下的所有ts文件都移出来了啊。。
现在不是了吧
[ Last edited by zw19750516 on 2008-5-23 at 10:04 PM ]
作者: moniuming 时间: 2008-5-23 22:04
错了,改过来了
@echo off
set "a=不说爱你"
::放在要运行的目录中,如果根目录为其它盘,请作适当更改
for /f "delims=" %%i in ('dir /s/b/a-d "*.ts"') do call :aa %%i
pause&goto :eof
:aa
pushd f:\
set /a n+=1
if exist %a%%n%.ts goto :aa
move /y %1 %a%%n%.ts
popd
[ Last edited by moniuming on 2008-5-23 at 10:12 PM ]