Link to home
Start Free TrialLog in
Avatar of lm1189
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
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All files (recursively) in a list:
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
dir /b >> list.txt 

Open in new window


will create a simple text file with file and folder names.