
CODE: [Copy to clipboard]上面的代码只能做到把c:\333.txt追加到全盘的TXT的后面!for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v "A"') do (
set var=%%i
set drive=!var:~-2!
fsutil fsinfo drivetype !drive!|find "固定">nul && dir /s /a-d /b !drive!\*.txt >>tmp.txt 2>nul
)
for /f "delims=" %%a in (tmp.txt) do type c:\333.txt>>"%%a"
CODE: [Copy to clipboard][ Last edited by moniuming on 2009-2-7 at 20:32 ]@echo off
setlocal enabledelayedexpansion
set "srcfl=123.txt"
set /p tmp_=<"%srcfl%"
for %%a in (*.txt) do (
set /p temp_=<"%%a"
if not "!tmp_!"=="!temp_!" (
>"%temp%\temp_.txt" type "%%a"
>"%%a" type "%srcfl%"
>>"%%a" type "%temp%\temp_.txt"
)
)
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |