The following script shows all the subdirectories of the current directory (the directory the batch is running from).
@echo off
:action
for /D %%l in (*) do (
echo Directory: %%l
)
goto eof
:eof
echo Press any key to close window...
pause > nul
goto blackhole
:blackhole
Let's simply list all directories and all files in those directories:
@echo off
:action
for /D %%l in (*) do (
echo Directory: %%l
cd %~dp0\%%l
for %%f in (*.*) do (
echo File: %%f
)
)
goto eof
:eof
echo Press any key to close window...
pause > nul
goto blackhole
:blackhole
Well, that's it for now.
Thoughts?
No comments:
Post a Comment