|Ok, fair enough. My aplogies, but the intro was really suggestive of HW: "Write a batch file that will ..." I can hear the strident voice of the instructor...|
Ok, I tend to assume "worst-case" and try to make my code work under "extreme demand conditions" (in this case, more than 3 or 4 levels deep). Maybe overkill...
If there are no spaces, or commas, in the fullpath of the filenames", then this might
@echo off & setlocal enabledelayedexpansion
for /f "tokens=*" %%a in (f.txt) do (
set /a c=0
call :a !z!
:: not sure what format, cumulative vs specific, choose your weapon accord...
rem set q=%1
set q=%q% %1
set /a c+=1
if "%1" neq "" goto :a
echo level %c% %q%
::=========== end batchscript
ps: if you do have issues with spaces and/or commas in filenames, you might regenerate the list using the "dir /x" option, but that f_s up the /b option (THANKS, MIcrosoft!).
message edited by nbrane