Batch Loop Through Files In Subdirectories

Loop

Batch Loop Through Files In A Directory

When answering a question please:. Read the question carefully. Understand that English isn't everyone's first language so be lenient of badspelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, oredit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it.Provide an answer or move on to the next question.Let's work to help developers, not make them feel stupid.

Top

Apr 30, 2017 - The final solution to this question, with the help of the recommendation by Squashman to use /R instead of /f is: @echo off for /R%%f in (.txt) do echo%%f.

Batch Loop Through Files In Subdirectories Youtube

Batch Loop Through Files In SubdirectoriesWindows cmd loop through files in folder

So I Am Working On Multiple Batch Programs and I need to know how to loop through all files including files inside the sub-folders. However, I was unable to do so. One of these programs that requires this is using the command 'certutil -encode' which encodes all files in that folder and sub-folders and decode with the command 'certutil -decode' and here is the code I got so far (this code is in a loop): set file=C:ExtrasEncode.txtcertutil -encode C:ExtrasEncode.txt C:ExtrasEncoded.b64However this doesn't work since it only loops through C:ExtrasEncode but doesn't test for the ones inside sub-folders like C:ExtrasEncodeSubfolder so what do I do?EDIT: I know the second part with the output being C:ExtrasEncoded.hex is wrong.