By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,474 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,474 IT Pros & Developers. It's quick & easy.

Directory tree scanning

P: n/a
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 Directory
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
Feb 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sun, 19 Feb 2006 12:59:48 +0100, Alan Searle
<aj*******@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 Directory
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


Feb 19 '06 #2

P: n/a
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*******@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 Directory
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


Feb 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.