Batch Files: List all files in a directory, print as .txt and place output file in all sub directories

后端 未结 1 1217
北荒
北荒 2021-01-16 18:27

1.
Searched everywhere, I do find tutorials to print list of files in directory and sub directories using dir command as follows:

@echo         


        
相关标签:
1条回答
  • 2021-01-16 18:53

    This uses the for variable modifiers as the directory it needs to write the list.txt file.

    del /s list.txt
    for /F "delims=" %%G IN ('dir /b /s') DO @echo "%%G">>"%%~dpGlist.txt"
    
    0 讨论(0)
提交回复
热议问题