1. Searched everywhere, I do find tutorials to print list of files in directory and sub directories using dir command as follows:
@echo
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"