batch file - Running a command in all folders under a parent subdirectory -


i have case have n number of sub folders under parent folder x. folder names not in order.

i have requirement have go each of these subfolders , perform specific task or run command (for example create text file called new.txt).

how can this?

put script bellow in bat file , place in root directory tree. run it. create file new.txt in folders. can replace command or add others. %%a folder path.

@echo off  /f "tokens=*" %%a in ('dir /b /s /ad') (     rem command execute each folder     type nul >"%%a\new.txt" ) 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -