Results 1 to 3 of 3

Thread: Generate Text File containing Directory structure

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Posts
    133

    Generate Text File containing Directory structure

    Hello,

    What I would like to do is generate a text file containing full paths of all files within subdirectories.

    So for instance, in my application, I would choose a folder on my C: drive. Let's say the folder name is TEST. In the TEST directory there are folders and files. I would like to have the program generate a text file similar to this:
    C:\TEST\1.txt
    C:\TEST\2.txt
    C:\TEST\Dir1\1.txt
    C:\TEST\Dir2\2.txt

    It would store a full path on each line representing all files and all files under all sub-directories...


    Is this possible?

  2. #2
    Banned
    Join Date
    May 2006
    Posts
    161

    Re: Generate Text File containing Directory structure

    Sure its possible,
    do you have specific questions. Take a look at the DirectoryInfo class, FileInfo class,
    Readers / Writers..etc.
    There is plenty of sample code in msdn vb 2005 / .net 2k3.

  3. #3
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Generate Text File containing Directory structure

    rjdpa, have a look at the attachment I posted here.

    http://www.vbforums.com/showthread.php?t=431294

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width