Directory listing exclude subfolders

  • Thread starter Thread starter Justin Fancy
  • Start date Start date
J

Justin Fancy

Hi Everyone,

I am trying to print out a directory listing of all FILES located on a
server, inclusing subdirectories, subfolders, etc.

BUT, in the text file, i only want the path and filename and the
extension.

Example:

c:/documents/this.txt
c:/you.log
c:/documents/thisfolder/thenthisfolder/test.vbproj

So far, I have narrowed it down to all files AND directories, but I
only need files.

Here's my code:

dir /on /b /s /w > crawl.txt

Any suggestions?

J
 
Hi Everyone,

I am trying to print out a directory listing of all FILES located on a
server, inclusing subdirectories, subfolders, etc.

BUT, in the text file, i only want the path and filename and the
extension.

Example:

c:/documents/this.txt
c:/you.log
c:/documents/thisfolder/thenthisfolder/test.vbproj

So far, I have narrowed it down to all files AND directories, but I
only need files.

Here's my code:

dir /on /b /s /w > crawl.txt

Any suggestions?

add /a-d
 
Back
Top