0

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?

2
  • What's wrong in cmd /U /C dir /b /s /a:d >> "filenames.txt" ?
    – JosefZ
    Commented Feb 4, 2019 at 18:45
  • Didn't know you can do that. That's perfect, thank you!
    – BurrowDeck
    Commented Feb 4, 2019 at 18:59

0

You must log in to answer this question.

Browse other questions tagged .