Retreiving directory file and folder information

M

Monty

We're reorganising our directory structure, which means a
lot of database movements, which in turn will impact on
LOTS of attached tables. I volunteered to have Access
(2.0, 97, or 2000 - take your pick) automatically audit
our directory structure, logging each *.mdb file it finds,
before later updating any attachment paths therein,
following a re-organisation.

However, I'm struggling to find the right code or call to
allow me to perform wildcard searches and filter through
subfolders. Ideally, it would return the full path and
name of the database whenever it found a vaild file, which
would then allow me to log, update, etc.

Any ideas or pointers would be most appreciated.
 
J

John Nurick

Hi Monty,

IMO the simplest way is to open a command prompt (what we used to call a
DOS box) and use a series of DIR commands like this

DIR X:\*.mdb /S /B >> C:\Temp\MDB_list.txt

, one for each drive involved, to create a textfile MDB_list.txt
containing the paths of all the MDB files on the network.

Once you've got this you can import it into an Access table or do
whatever else you want.
 
G

Guest

Beautiful.

Hadn't considered something that simple. Bit of a
wood/trees mismatch there. D'oh.

It's much better than I envisaged - it affords me far more
flexibility in the process, as well as cutting down dev
time. Nice one !

Thanks for that - much appreciated.
-----Original Message-----
Hi Monty,

IMO the simplest way is to open a command prompt (what we used to call a
DOS box) and use a series of DIR commands like this

DIR X:\*.mdb /S /B >> C:\Temp\MDB_list.txt

, one for each drive involved, to create a textfile MDB_list.txt
containing the paths of all the MDB files on the network.

Once you've got this you can import it into an Access table or do
whatever else you want.





We're reorganising our directory structure, which means a
lot of database movements, which in turn will impact on
LOTS of attached tables. I volunteered to have Access
(2.0, 97, or 2000 - take your pick) automatically audit
our directory structure, logging each *.mdb file it finds,
before later updating any attachment paths therein,
following a re-organisation.

However, I'm struggling to find the right code or call to
allow me to perform wildcard searches and filter through
subfolders. Ideally, it would return the full path and
name of the database whenever it found a vaild file, which
would then allow me to log, update, etc.

Any ideas or pointers would be most appreciated.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 
J

John Nurick

Glad to help.

BTW, I've a little VB utility somewhere that does mass re-targeting of
Windows shortcuts, left over from the last time I had to revise network
folders. Let me know if you need it.

Beautiful.

Hadn't considered something that simple. Bit of a
wood/trees mismatch there. D'oh.

It's much better than I envisaged - it affords me far more
flexibility in the process, as well as cutting down dev
time. Nice one !

Thanks for that - much appreciated.
-----Original Message-----
Hi Monty,

IMO the simplest way is to open a command prompt (what we used to call a
DOS box) and use a series of DIR commands like this

DIR X:\*.mdb /S /B >> C:\Temp\MDB_list.txt

, one for each drive involved, to create a textfile MDB_list.txt
containing the paths of all the MDB files on the network.

Once you've got this you can import it into an Access table or do
whatever else you want.





We're reorganising our directory structure, which means a
lot of database movements, which in turn will impact on
LOTS of attached tables. I volunteered to have Access
(2.0, 97, or 2000 - take your pick) automatically audit
our directory structure, logging each *.mdb file it finds,
before later updating any attachment paths therein,
following a re-organisation.

However, I'm struggling to find the right code or call to
allow me to perform wildcard searches and filter through
subfolders. Ideally, it would return the full path and
name of the database whenever it found a vaild file, which
would then allow me to log, update, etc.

Any ideas or pointers would be most appreciated.

--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top