|
Re: Executing .bat file in multiple subdirectories
for /F "usebackq delims=" %k IN (`dir *.tif /s /b`) DO @echo %~dpnk
here i just @echoed it to the display, try it at the command prompt and it looks like doing a fancy dir *.tif and will also show all the subdirectory contents too.
so in example if i was using irfanview (which, by the way, does batch conversion etc) to process a directory tree of tif files, like your doing, then i would use it's command line version like this...
for /F "usebackq delims=" %k IN (`dir *.tif /s /b`) DO c:\program files\i_view32.exe %~dpnk /convert=%~dpk\*.jpg
(not exactly correct, would have to tell iview it's getting a tif extension, but you get the idea).
so, up to you whether you use it directly or call the next batch file.
%k (full path)
%~dpnk (path, no extention)
%~dpk (only shows directories part that have k files but not filenames)
__________________
|