Save the paths of all directories and files in the current directory#
dir /b /s > filelist.txt
Save only the paths of all files in the current directory#
for /r %i in (*) do @echo %i >> filelist.txt
Save the paths and sizes of all files in the current directory#
for /r %i in (*) do @echo %~fi %~zi >> filelist_with_sizes.txt