Page 1 of 1

to dir or not to dir

Posted: 06 Jan 2024 02:11
by BABUT

Code: Select all

set Dir?=for /l %%# in (1 1 2) do if %%#==2 (for /f "tokens=*" %%# in (!in!) do if not "%%~a#"=="d----------" color 11) else setlocal enabledelayedexpansion ^& set in=
example:

Code: Select all

%Dir?%"c:\windows"
if %errorlevel%==0 (echo dir) else (echo file)
it works through symbolic links(everything you can google doesn't work)

Re: to dir or not to dir

Posted: 06 Jan 2024 13:26
by miskox
2B OR NOT 2B=FF

Saso