Welcome! Log In Create A New Profile

Advanced

find all sub directories

Posted by emirhan 
emirhan
find all sub directories
February 18, 2009 03:05PM
Hi all,

How can I find all subdirectories names in a given path. For example path name : "c:\pictures\aa\bb\cc\dd\ee"
I need the result = pictures,aa,bb,cc,dd,ee

Thanks
Peter Holemans
Re: find all sub directories
February 18, 2009 03:39PM
Hi,

Path is string = fExtractPath(DeviceAndPathAndFileName,fDirectory)
--SOLUTION 1:--
For all string SubDir of Path separated by "/"
  Trace(SubDir)
End

--SOLUTION 2:--
MyArray is array of 0 string
StringToArray(Path,MyArray,"/")
For all element SubDir of MyArray
  Trace(SubDir)
End

--SOLUTION 3:--
Use your imagination...

Cheers,
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: