Results 1 to 6 of 6

Thread: Path of Folders and Subfolders

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    3

    Path of Folders and Subfolders

    I am a new programmer, pls help. The prog I am coding requires me to read write down the path of each folders, subfolder and sub-sub-folders from a specifed main folder.

    So for eg. My main folder is (C:\temp\) and inside this folder there are 3 folders, and within each folders there are other sub folders. My output should be:

    C:\temp\a
    C:\temp\a\abc
    C:\temp\a\def
    C:\temp\a\ghi
    C:\temp\b\abc
    C:\temp\b\def
    C:\temp\c\abc\abc\def
    C:\temp\c\def\abc

    So how should I code this? Pls help. ...
    Let's Reach for the S*T*A*R*S!!!

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    recursion
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Search here . This has been asked many times .

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    3

    Smile

    as I am new, can you give me a simple example of recursion?
    Let's Reach for the S*T*A*R*S!!!

  5. #5
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Rux@
    as I am new, can you give me a simple example of recursion?
    Buy a book.

    Recursion is when a function (or maybe sub) that calls itself.

    like

    VB Code:
    1. Public Function OMG(ByVal Number As Integer) As Integer
    2. Number + 2
    3. If Number <= 10 then
    4. OMG(Number)
    5. Else
    6. Return Number
    7. End If
    8. end function

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    3

    Talking

    Ok .. thanks .. I sort of know what it means now.
    Let's Reach for the S*T*A*R*S!!!

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