Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


List folders X deep question

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,61613
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> List folders X deep question
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 List folders X deep question - 6/19/2008 12:18:40 AM   
  ninjamaster

 

Posts: 107
Score: 0
Joined: 1/23/2007
Status: offline
I want to run a script that will list a folder structure but *only* a set number of directories from root.

I had a look at the script on the FAQ for it but when I runit nothing happens so I can't even begin to try and figure out how the whole recursive thing works :#

I get no echo return (objDict.Keys is empty maybe?)


      

< Message edited by ninjamaster -- 6/19/2008 12:23:31 AM >
 
 
Post #: 1
 
 RE: List folders X deep question - 6/19/2008 3:57:04 AM   
  ebgreen


Posts: 5041
Score: 31
Joined: 7/12/2005
Status: offline
This specific question (recursing x levels deep) has been asked before and answered. Basically you pass an integer to your recursive function that you increment every time you recurse. Then in the function you don't have the function call itself (recurse) if the integer is greater than your limit.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ninjamaster)
 
 
Post #: 2
 
 RE: List folders X deep question - 6/19/2008 4:14:01 AM   
  dm_4ever


Posts: 2665
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
The script you posted was originally for files located under x number of directories...you have to do a small modification to do folders.


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ninjamaster)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> List folders X deep question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts