Script 1
@echo offScript 2
::demonstrates relative directory recursion
::does not detect hidden files
:main
for %%v in (*.*) do echo %%v
for /d %%v in (*.*) do call :sub "%%v"
goto :eof
:sub
for %%f in ("%~1\*.*") do echo %%f
for /d %%d in ("%~1\*.*") do call :sub "%%d"
goto :eof
@echo offScript 3
::demonstrates directory recursion
::does detect hidden files but outputs fullpath
for /r %%v in (*.*) do echo %%v
@echo off
::demonstrates directory recursion
::detects hidden files & outputs relative path
setlocal enabledelayedexpansion
for /r %%v in (*.*) do set n=%%v&echo !n:%CD%\=!
No comments:
Post a Comment