|
Home > Archive > MS Access database support > February 2006 > Re: Directory tree scanning
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Directory tree scanning
|
|
| Tom van Stiphout 2006-02-19, 1:24 pm |
| On Sun, 19 Feb 2006 12:59:48 +0100, Alan Searle
<aj_searle@xxxyahoo.com> wrote:
Perhaps issue this command:
dir c:\mydir /a:d /b /s>dirs.txt
I would probably store the directories as full paths rather than one
element which would require me to call sql recursively. Although, if
my data source was sql server 2005, I could take advantage of the new
support for recursive calls...
-Tom.
>I would like to 'grab' certain directory trees and then store them in a
>table.
>
>At the moment, I writing my own VBA to do this but I cannot help
>thinking that there must already be something (i.e. plug-ins or snippet
>of code) around that can do this. Can anyone advise me on this?
>
>And what is the most efficient/flexible way to store directory trees?
>At the moment I am planning to drop the directory tree into the
>following table:
>
> level ID Parent Dire
ctory
>1 1 0 c:\
>2 2 1 docs
>2 3 1 projects
>2 4 1 various
>3 5 3 Project01
>3 6 2 AdminDocs
>
>I am also planning (at some point) to write the directory tree out to
>XML so that it can be browsed with a web browser and am not pondering
>the correct XML structure for (variable depth) directory trees. Maybe
>there is already a standard for storing this?
>
>Any tips on these points would be a great help.
>
>Many thanks,
>Alan Searle
| |
| Alan Searle 2006-02-20, 3:24 am |
| Hi Tom,
Fantastic! There's me, playing around with a whole lot of VBA and all I
needed was a DOS command. Excellent!
I'll have to dig out my old DOS manuals :-)
.... or do you know of a good HOWTO site which lists the most
interesting/useful DOS commands that are still applicable to Win2K and
WinXP?
Many, many thanks for this.
Regards,
Alan.
PS: And, yes, I think you're right and I will store my directories as
full paths. The only thing that I'm worried about is that some of my
clients have rediculously long path names and I am worried that I will
blow maximum string lengths somewhere at some point.
Tom van Stiphout schrieb:
> On Sun, 19 Feb 2006 12:59:48 +0100, Alan Searle
> <aj_searle@xxxyahoo.com> wrote:
>
> Perhaps issue this command:
> dir c:\mydir /a:d /b /s>dirs.txt
>
> I would probably store the directories as full paths rather than one
> element which would require me to call sql recursively. Although, if
> my data source was sql server 2005, I could take advantage of the new
> support for recursive calls...
>
> -Tom.
>
>
>
>
>
|
|
|
|
|