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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -