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
)
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
)
留言
張貼留言