Windows Batch Command Learning Note

1. How to print all the sub-folder names into a file ?
   dir/ad/b > file_list.txt
   => this will print the subfolder names into file_list.txt

2. How to execute the same batch file in the sub-folders?
   for example : xyz.bat
 
   for /d %%a in (*) do (
    cd %%a // go to the sub folder
    call xyz.bat
    cd ..  // back to the folder
)

留言

這個網誌中的熱門文章

Spread Spectrum Clock Generation (SSCG)

SIFS/DIFS/PIFS (802.11 Mac Layer)