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

c# - OpenXML hanging while writing elements -

php - regexp cyrillic filename not matches -

sql - Select Query has unexpected multiple records (MS Access) -