• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 859
  • Last Modified:

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.
0
lm1189
Asked:
lm1189
1 Solution
 
Bill PrewCommented:
Sure, just do the following at a command prompt:

dir /b /s "c:\yourfolder\*.*" >results.txt

~bp
0
 
BenefordCommented:
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
0
 
Raj-GTSystems EngineerCommented:
dir /b >> list.txt 

Open in new window


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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now