联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off for /f "delims=" %%i in ('dir X:\test8 /b') do move "X:\test8\%%i\%%i.lnk" %temp% for /f "delims=" %%i in ('dir X:\test8 /b') do move "X:\test8\%%i\%%i.log" %temp% for /f "delims=" %%i in ('dir X:\test8 /b') do move "X:\test8\%%i\%%i.txt" %temp% for /f "delims=" %%i in ('dir X:\test8 /b') do move "X:\test8\%%i\%%i.url" %temp% @pause
@echo off for %%i in (lnk,log,txt,url) do ( for /f "delims=" %%j in ('dir /ad /b x:\test8') do move “x:\test8\%%j.%%i” %temp% ) pause>nul
@echo off for /f "delims=" %%i in ('dir /ad /b x:\test8') do ( for %%j in (lnk log txt url) do echo move "x:\test8\%%i.%%j" %temp% ) ) pause>nul
Originally posted by zh159 at 2008-4-15 16:36: PS:只修改LS的 LS的是每种扩展名都要搜索一遍所有文件夹 应该反过来,这样效率好些: [code]@echo off for /f "delims=" %%i in ('dir /ad /b x:\test8') ...