I don't know why the code has an error as soon as it is simplified a bit. There is still a bug that hasn't been eliminated (but it's not easy to encounter). I'll deal with it when I have time. It confused me in testing. Whoever has patience can debug it slowly.
Deal with the "empty parameter directory" in the deformed file with a bit of directory as in floor 10, no matter how deep it is!
(Run it in the path where the deformed directory is located). There is currently no bug found in this code
Any deformed directory: "empty parameter directory" contains directories with dots and reversers (run it in the path where the deformed directory is located)
[ Last edited by plp626 on 2008-3-14 at 08:43 PM ]
Deal with the "empty parameter directory" in the deformed file with a bit of directory as in floor 10, no matter how deep it is!
(Run it in the path where the deformed directory is located). There is currently no bug found in this code
@echo off&mode con lines=2 cols=15
for /f "delims=" %%a in ('dir/ad/s/b^|findstr /e "\."') do (
set a=%%a
setlocal enabledelayedexpansion
call set a=!!a:%%~dpa=!!
call :nul "!a!" "%%~dpa"
popd
)
goto :eof
:nul
pushd %2 2>nul||(echo &del +&goto :eof)
rd /q/s "%b%%~1.\">+ 2>&1
find "\" +>nul||(del +&goto :eof)
for /f %%b in ('sort /r +') do rd/q/s "%%b\" 2>nul
goto nulAny deformed directory: "empty parameter directory" contains directories with dots and reversers (run it in the path where the deformed directory is located)
@echo off
::Test under ntfs format,
for /f "delims=" %%a in ('dir/ad/s/b^|findstr /e "\."') do (
set a=%%a
setlocal enabledelayedexpansion
call set a=!!a:%%~dpa=!!
call :nul "!a!" "%%~dpa"
popd
)
pause
goto :eof
:nul
pushd %2 2>nul||call :con %*
:nul1
rd /q/s "%b%%~1.\">+ 2>&1
find "\" +>nul||(del +&goto :eof)
for /f %%b in ('sort /r +') do rd/q/s "%%b\" 2>nul
goto nul
:con
set b=%2
call set b=!!b:%~dp0=!!
goto nul1[ Last edited by plp626 on 2008-3-14 at 08:43 PM ]
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| 523066680 | +2 | 2008-03-15 18:16 |

Ah Niu ah! You're so awesome!