Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    useing Server.Mappath

    I was wondering how do I use Server.MapPath to get all the subfolders in a folder for example

    folder images inside that folder is flowers , people, places inside all of them are images but there are images in the images folder as well I need to see all the images for all the folders?

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You don't, this is job for the FileSystemObject.

    You can use it to get all the files in all the folders.
    OracleGuy

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Crash1hd

    How is it possible that you haven't read this thread?:

    http://www.codingforums.com/showthre...&threadid=8736

    It used to be sticky, but I'm going to re-stick it just for you (not sure why I unstuck it anyway!)

    P.S. The relevant link in the above-mentioned thread is here:

    http://www.brainjar.com/asp/dirlist/

    I think that is a very good example, although you still need to go to w3schools.com and learn everything about FSO, if you plan on modifying it successfully. Not to mention the fact that it's a very good example of recursion in ASP (or the principle itself, regardless of the language). I think that's where I learned it.
    Last edited by whammy; 10-21-2003 at 02:33 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Whammy,

    I think George went though and tried to reduce the number of stickies, see: http://www.codingforums.com/showthre...threadid=26103
    OracleGuy

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That's cool, I dunno if he modified this forum, but I've only had 3 stickies at any one time, if I recall correctly (until now).
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I really dont know how I forgot about those pages but thats what happens when you post and run lol

    Thanks again

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No problem, you should be able to modify brainjar's code to do what you want, it sounds like exactly what you're looking for.

    I have some other stuff that I use at home and at work that is based off of the same idea, but I think his example is closer to what you're trying to do.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #8
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yep I was sucessfully able to do what I needed

    Thanks

  • #9
    Regular Coder
    Join Date
    Aug 2003
    Posts
    565
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My reply will probably seem irrelevant at this point but you should maybe check this thread in which the downside of FSO was mentionned... It doesn't concern your question directly since you want to get all the subfolders in a folder, but it might be interesting to read it anyways...

    http://www.codingforums.com/showthre...threadid=27547
    Last edited by jeskel; 10-22-2003 at 11:41 AM.


  •  

    Posting Permissions

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