I'm trying to output directory and .txt file names using the following:
dir /b /s /a:d >> "filenames.txt"
dir /b /s *.txt >> "filenames.txt"
But some of the file and directory names use non-ASCII characters. If I put these in a .bat file, open cmd with /u
, navigate to the folder I want and open the .bat file, it does what I want.
But I want to speed this process up, it has too many steps. Is there a way to make this less clumsy/winded?
cmd /U /C dir /b /s /a:d >> "filenames.txt"
?