• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

code to output directory list

Lasthitlarry

Senior member
Basically I have always wanted to easily output some sort of text file that has a list of all the files in a directory, specifically my music folder (sort of like a playlist but in text form). It could list just folder names in tree form, or even filenames within folders, so it would be easy to post what I have to others.

Didn't know if anyone here had somethin up their sleeve already, just figured posting would be better than not.

Thanks!
 
Just to throw in an alternative, try "tree /f /a > output.txt". 🙂

Edit: Better make that ASCII. "tree" without /a displays nicely, but doesn't save. Without /f it just prints the directories.
 
Originally posted by: Ken_g6
Just to throw in an alternative, try "tree /f /a > output.txt". 🙂

Edit: Better make that ASCII. "tree" without /a displays nicely, but doesn't save. Without /f it just prints the directories.

Wow that's awesome! Didn't know about that.
 
Are you looking for something command line or something to put into a C++ program? Obviously you can invoke the command line call from your program, but you can also use the System::IO:: Directory namespace to access Directories and File. iirc, you just need that one to look at files. You may need System::IO::File also, but I'll leave that to you.
 
Back
Top