General Chat
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsGeneralGeneral Chat

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 16th, 2003, 01:12 PM
cwick99 cwick99 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Maryland, USA
Posts: 55 cwick99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to cwick99
list directories recursively

Hello,
I created a php script that would list directories and their files. However, it was not recursive and thus, it only lists folders and files, can not show subfolders, etc.

here is the pseudo code to do it: anyone have a script that can recursively display folders and their subsequent subfolders and files?

I need it for work...and unfortunately I never made my script recursive...if I had time I would do it myself.

php Code:
Original - php Code
  1.  
  2. function traverse_dir($dir)
  3. {
  4.   open $dir
  5.   read in files
  6.   put directories in an array
  7.   loop through array foreach dir as $subdir
  8.   {
  9.     do something with $subdir
  10.     traverse_dir($subdir)
  11.   }
  12. }


thanks in advance.

Craig

Reply With Quote
  #2  
Old October 16th, 2003, 02:22 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via AIM to notepad
RE: list directories recursively

you don't have time for work? ..i thought that's what they paid you for.

anyway, seeing as how you don't need help with code but rather want someone to write it for you, i moved this to the appropriate thread.

Reply With Quote
  #3  
Old October 16th, 2003, 02:56 PM
cwick99 cwick99 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Maryland, USA
Posts: 55 cwick99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to cwick99
RE: list directories recursively

well thank you. It's not that I don't have time for work, I guess I misworded my post.

I wanted to use the script I had written for something I am doing at work. However, the script I made is not necessary for what I am doing, however, if it worked recursivley, it would make it easier, and faster for me to be able to add files/folders, etc.

Didnt want to spend much time with it, since that wasn't a requirement.

Reply With Quote
Reply

Viewing: Codewalkers ForumsGeneralGeneral Chat > list directories recursively


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway