Discussion:
list endpoint folders
(too old to reply)
Tom Del Rosso
2023-05-20 08:33:18 UTC
Permalink
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?

The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
--
Defund the Thought Police
R.Wieser
2023-05-20 09:35:43 UTC
Permalink
Tom,
How do you operate on all folders in a tree that don't have subfolders, so
just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns .
and .. and never errorlevel 1.
You could try to use

for /d %%a in (%1\*) do ...

(replace the "..." with, for example, something setting a flag indicating a
subfolder was found)

Regards,
Rudy Wieser
Herbert Kleebauer
2023-05-20 15:49:44 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
@echo off
for /f %%i in ('dir /ad /s /b') do call :sub %%i
goto :eof

:sub
pushd %1
set last=true
for /f %%j in ('dir /ad /s /b') do set last=false
popd

if %last%==true echo %1 has no subdirectories
if %last%==false echo %1 has subdirectories
goto :eof
mokomoji
2023-05-20 17:42:43 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
--
Defund the Thought Police
sample.cmd
--------------------------------------------------------------------------------
@echo off
md .\ddad\1231\sfsf123\adf
md .\ddad\1231\sfsf123\a1df
md .\ddad\1231\sfsf123\a3df
md .\ddad\1231\sfsf13\adf
md .\ddad\1231\sfsf13\a1df\1
md .\ddad\231\sfsf123\adf
md .\ddad\231\sfsf123\a1df
md .\ddad\231\sfsf123\a3df
md .\ddad\231\sfsf13\adf
md .\ddad\231\sfsf13\a1df\2
md .\ddad\31\sfsf123\adf
md .\ddad\31\sfsf123\a1df
md .\ddad\31\sfsf123\a3df
md .\ddad\31\sfsf13\adf
md .\ddad\31\sfsf13\a1df\3

md .\ddxad\1231\sfsf123\adf
md .\ddxad\1231\sfsf123\a1df
md .\ddxad\1231\sfsf123\a3df
md .\ddxad\1231\sfsf13\adf
md .\ddxad\1231\sfsf13\a1df\1
md .\ddxad\231\sfsf123\adf
md .\ddxad\231\sfsf123\a1df
md .\ddxad\231\sfsf123\a3df
md .\ddxad\231\sfsf13\adf
md .\ddxad\231\sfsf13\a1df\2
md .\ddxad\31\sfsf123\adf
md .\ddxad\31\sfsf123\a1df
md .\ddxad\31\sfsf123\a3df
md .\ddxad\31\sfsf13\adf
md .\ddxad\31\sfsf13\a1df\3
-------------------------------------------------------------------------------------



lastfolder.cmd
-------------------------------------------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"

for /f "delims=" %%f in (
'dir /ad /b /s'
) do (
dir /ad /b "%%f"|findstr /r "[0-9] [a-z]"2>nul>nul||(
echo %%f
))
endlocal
pause
---------------------------------------------------------------------------------------------

output
-----------------------------------------------------------------------------------------
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\a1df\1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\a1df\2
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\a1df\3
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\a1df\1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\a1df\2
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a1df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a3df
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\adf
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\a1df\3
계속하려면 아무 키나 누르십시오 . . .
--------------------------------------------------------------------------------
mokomoji
2023-05-20 17:46:09 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
--
Defund the Thought Police
errorlevel type cmd file

------------------------------------------------------------------------
@echo off
setlocal
cd /d "%~dp0"

for /f "delims=" %%f in (
'dir /ad /b /s'
) do (
dir /ad /b "%%f"|findstr /r "[0-9] [a-z]"2>nul>nul&&(
echo %%f------------errorlevel 0)||(
echo %%f------------errorlevel 1))
endlocal
pause
------------------------------------------------------------------------------------

output
-----------------------------------------------------------------------------------
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\a1df\1------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\a1df\2------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\a1df\3------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\a1df\1------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\a1df\2------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a1df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a3df------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\a1df------------errorlevel 0
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\adf------------errorlevel 1
C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\a1df\3------------errorlevel 1
------------------------------------------------------------------------
Kenny McCormack
2023-05-20 18:05:02 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
dir /ad | findstr "/C:2 Dir(s)" >nul && echo This directory has no subdirectories!
--
The single most important statistic in the US today - the one that explains all the
others - is this: 63 million people thought it was a good idea to vote for this clown
(and will probably do so again). Everything else is secondary to that. Everything else
could be fixed if we can revert this one statistic. Nothing can be fixed until we do.
mokomoji
2023-05-20 18:29:44 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have subfolders,
so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always returns
. and .. and never errorlevel 1.
--
Defund the Thought Police
[2] Countries using byte characters use the diff algorithm
sample.cmd

korea,japan,china,taiwan,etc...

--------------------------------------------------------------------------
@echo off
chcp 65001 2>nul
md .\ddad\1231\sfsf123\adf
md .\ddad\1231\sfsf123\a1df
md .\ddad\1231\sfsf123\a3df
md .\ddad\1231\sfsf13\adf
md .\ddad\1231\sfsf13\a1df\1
md .\ddad\231\sfsf123\adf
md .\ddad\231\sfsf123\a1df
md .\ddad\231\sfsf123\a3df
md .\ddad\231\sfsf13\adf
md .\ddad\231\sfsf13\a1df\2
md .\ddad\31\sfsf123\adf
md .\ddad\31\sfsf123\a1df
md .\ddad\31\sfsf123\a3df
md .\ddad\31\sfsf13\adf
md .\ddad\31\sfsf13\a1df\3

md .\ddxad\1231\sfsf123\adf
md .\ddxad\1231\sfsf123\a1df
md .\ddxad\1231\sfsf123\a3df
md .\ddxad\1231\sfsf13\adf
md .\ddxad\1231\sfsf13\a1df\1
md .\ddxad\231\sfsf123\adf
md .\ddxad\231\sfsf123\a1df
md .\ddxad\231\sfsf123\a3df
md .\ddxad\231\sfsf13\adf
md .\ddxad\231\sfsf13\a1df\2
md .\ddxad\31\sfsf123\adf
md .\ddxad\31\sfsf123\a1df
md .\ddxad\31\sfsf123\a3df
md .\ddxad\31\sfsf13\adf
md .\ddxad\31\sfsf13\a1df\3

md ".\한국\korea\우리 나라"
md ".\韓國\korea\大韓民國"

---------------------------------------------------------------------------

lastfolder_2byte
----------------------------------------------------------------------------
@echo off
setlocal
chcp 65001
cd /d "%~dp0"

for /f "delims=" %%f in ('dir /s /ad /on /b') do (
call set /a z_num+=1
call set "z_var_%%z_num%%=%%~f"
)

for /f "tokens=1* delims==" %%f in ('set z_var_') do (
set z_var_|find /c "%%~g"|find "1" 2>nul>nul&&(
echo true--%%g---00
)||(
echo xxxx-%%g--fail
))

endlocal
pause
----------------------------------------------------------------------
output
---------------------------------------------------------------------
Active code page: 65001
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\a3df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\a1df--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\adf---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13\a1df\1---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\a3df---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\a1df--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\adf---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231\sfsf13\a1df\2---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\a3df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\a1df--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\한국--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\adf---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31\sfsf13\a1df\3---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\a3df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\韓國--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\a1df--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\adf---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\1231\sfsf13\a1df\1---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\a3df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\a1df--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\231\sfsf13\a1df\2---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a1df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\a3df---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf123\adf---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\a1df--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\adf---00
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddxad\31\sfsf13\a1df\3---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\韓國\korea--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\231--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\韓國\korea\大韓民國---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\한국\korea--fail
true--C:\Users\mokomoji\Desktop\배치파일 2023\20230521\한국\korea\우리 나라---00
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\31--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf123--fail
xxxx-C:\Users\mokomoji\Desktop\배치파일 2023\20230521\ddad\1231\sfsf13--fail
Press any key to continue . . .

------------------------------------------------------------------------------
Tom Del Rosso
2023-05-25 03:18:04 UTC
Permalink
Post by Tom Del Rosso
How do you operate on all folders in a tree that don't have
subfolders, so just the endpoints?
The obstacle is that if you test a folder with DIR /AD it always
returns . and .. and never errorlevel 1.
Thanks all.

This was a temporary script but I'll remember these ideas for the future
too.
--
Defund the Thought Police
Loading...