bnkrazy
07-21-2005, 06:05 PM
Is it possible to search recursively up a directory tree?
For example, I download all my updates into a folder called %Program Folder%\Updates\%ProgramVersion%\
I know that I can easily find the installed version by either A) jumping up two levels in the directory tree via a relative path or B) recurse the current path back up the tree untill I find my installed product.
I just don't know how to go about scripting either of the two options. :o
Is there a snippet of code somewhere that does a reverse directory recursion? A way to strip off the current folder and then continue up the tree? It sounds like it should be easy, but I don't know how to manipulate that _SourceFolder Path...which is ultimately what I need to do.
Thanks!
For example, I download all my updates into a folder called %Program Folder%\Updates\%ProgramVersion%\
I know that I can easily find the installed version by either A) jumping up two levels in the directory tree via a relative path or B) recurse the current path back up the tree untill I find my installed product.
I just don't know how to go about scripting either of the two options. :o
Is there a snippet of code somewhere that does a reverse directory recursion? A way to strip off the current folder and then continue up the tree? It sounds like it should be easy, but I don't know how to manipulate that _SourceFolder Path...which is ultimately what I need to do.
Thanks!