Using already an answer here
And it works with just one difference. Running dir /B
returns all the file's names correctly.
Now when I run dir /B > someFile.txt
it creates a .txt
file but also append the name someFile
at the end of the file.
This behaviour is just confusing me a bit. This means that it creates the .txt
file before listing the files name.
Shouldn't it be the other way around? Please enlighten.
Also, I find cmd
very intriguing and want to learn more about it and it's commands. Can you please refer some guides/articles/docs for the same. That would be really helpful. Thanks :)
someFile.txt
at the end of the list. This is the file in which I'm writing the list of files. I hope I'm clear and also thanks for the link. @Candy