lm1189
asked on
Creating a Text File of Directory Structure and Filepath
Is there a way to generate a list of files and folders in a directory and have them output to a text file? I need to traverse all files and folders in this directory and if possible in the file have a delimiter.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dir /b >> list.txt
will create a simple text file with file and folder names.
dir /b/s
If you just want the folders
dir /b/s/ad
If you want the result in a text file, use the pipe:
dir /b /s > textfile.txt