Created
November 19, 2024 07:34
-
-
Save lxfly2000/14ec9cbd19bd4e78e92fc4214a335d90 to your computer and use it in GitHub Desktop.
Revisions
-
lxfly2000 created this gist
Nov 19, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ @echo off setlocal ENABLEDELAYEDEXPANSION if "%~1"=="" ( echo No path specified. goto:eof ) call:listcd %1 goto:eof :listcd pushd %1 for /f %%i in ('dir/b') do ( dir/b/a:d %%i 1>NUL 2>NUL if !errorlevel!==0 ( call:listcd %%i ) else ( echo %%~dpnxi :: Add something to do with each file here... ) ) popd