batch file - How to recursively loop through a directory on a specific filetype? -
I can not get a specific mention of my problem, though it seems that this would be a common problem.
I am trying to loop through a batch file in a directory, no matter how deep.
What do I have here:
for / f "token = * delims =" %% a in ('dir% / s / b * .bat') (If not present then %% a * * echo %% a) Where the DIR is already defined, I am only resonating the files.
Obviously this is incorrect because it outputs all files for the first time, then all batch files.
It seems that I have any type of * .bat specifier and% DIR% variable but I'm not sure how to do this.
for / r% DIR% %% a in (* .bat) ( ...
Comments
Post a Comment