联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
set /a filesize = 0 for %%2 in (*.exe) do if %filesize% LSS %%~z2 set filesize = %%~z2 & echo %%2 > exefilelist.txt
@echo off &setlocal enabledelayedexpansion set /a "filesize=0" for %%i in (*.bat) do if !filesize! lss %%~zi set "filesize=%%~zi" & echo %%i >exefilelist.txt BJSH发表于: 2007-04-23 20:22
@echo off for /f "delims=" %%a in ('dir /b/a-d/os *.exe') do echo %%a>exefilelist.txt start exefilelist.txt
@echo off for /l %%a in (1,1,10) do ( if "%%a"=="7" goto :end echo/%%a :end ) pause
@echo off for /f "delims=" %%i in ('dir *.exe /o-s /a-d /b') do echo Unwiz.exe Un2install.exe | find /i "%%i" || (echo %%i>exefilelist.txt & goto :next) :next notepad.exe exefilelist.txt
Originally posted by dikex at 2007-4-24 00:54: 感觉还是使用dir来完成的效率较高,不过6楼的dir的参数貌似错了,变成了按日期排列-_-
Originally posted by bugmenot at 2007-4-24 08:35 AM: 继续出难题: 如果我想排除 un 开头的所有 exe 呢?
@echo off for /f "delims=" %%i in ('dir *.exe /o-s /a-d /b') do echo %%i | findstr /i /b "un" 1>nul 2>nul || (echo %%i>exefilelist.txt & goto :next) :next notepad.exe exefilelist.txt