
CODE: [Copy to clipboard][ Last edited by genteman on 2007-12-20 at 09:13 AM ]
::genteman - 2007-12-19 -CMD@WinXP Pro
::contact amdaround@163.com
@echo off
setlocal enabledelayedexpansion
if "%~1"=="" exit /b
if not exist %~s1\nul exit /b
cd "%~1"
%~d1
:rec
if exist "%cd%\*.txt" (
for /f "delims=" %%p in ('cd') do set filename="%%~np"
type *.txt>"..\!filename: =!.txt"
)
for /f %%i in ('dir "%cd%" /ad /b') do (
pushd "%cd%"
cd "%%i"
call :rec
popd
)
CODE: [Copy to clipboard][ Last edited by genteman on 2007-12-20 at 09:13 AM ]::genteman - 2007-12-19 -CMD@WinXP Pro
::contact amdaround@163.com
rem @echo off
if "%~1"=="" exit /b
if not exist %~s1\nul exit /b
for /r "%~1" %%i in (.) do (
cd "%%~fi"
%%~di
if exist *.txt type "*.txt">..\"%%~ni.txt"
)
CODE: [Copy to clipboard][ Last edited by genteman on 2007-12-20 at 09:14 AM ]::genteman - 2007-12-19 -CMD@WinXP Pro
::contact amdaround@163.com
rem @echo off
if "%~1"=="" exit /b
if not exist %~s1\nul exit /b
for /f "delims=" %%i in ('dir "%~1" /ad /b /s') do (
cd "%%~fi"
%%~di
if exist *.txt type "*.txt">..\"%%~ni.txt"
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |