Directory listing exclude subfolders

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
 
F

foxidrive

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top