General discussion

Locked

Dos Command for MDB files on a drive

By ideafixer ·
I had a dos command with a bunch of switched that would output the path and file name of every access database on a certain drive. I cannot find it! Does anyone know how to get a list like that? It was actually an answer to a question someone else asked.

Unfortunalty I cannot find that question anywere. I remember the command had like 4 switches in it. I only want basic file information in the text file.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Dos Command for MDB files on a drive

by Still_learning In reply to Dos Command for MDB files ...

Try the following (from the command prompt):

c:
dir *.mdb /s /p

the above changes drive to drive c:
then displays directory of any file with .mdb extension and pauses at the end of each screen. This can be redirected to a file as follows:dir *.mdb /s /p -> file.txt

where file.txt is the name of the output file. You can then view the contents of this file from any editor or word processor.

Collapse -

Dos Command for MDB files on a drive

by ideafixer In reply to Dos Command for MDB files ...

Thanks for the input. The below command worked better for what I was looking for.

Collapse -

Dos Command for MDB files on a drive

by BudTheGrey In reply to Dos Command for MDB files ...

The following switches are useful here:

/s -- search subdirectories
/p -- pause the output when the screen is full
/b -- give 'bare' file data


DIR C:\*.MDB /s will report the files in standard DIR format:

Directory of C:\WINNT\system32\ias

05/08/2001 08:00 409,600 dnary.mdb
05/08/2001 08:00 217,088 ias.mdb
2 File(s) 626,688 bytes

Add the '/b' switch for 'bare' format. This is useful if you are looking to make a text file ofjsut file names:

DIR C:\*.MDB /s/b
C:\WINNT\system32\ias\dnary.mdb
C:\WINNT\system32\ias\ias.mdb

In the above examples, of course, you would substitute the desired drive letter for "C:". Add redirection to create a file:

DIR C:\*.MDB /s/b >C:\FILELIST.TXT

Remeber to not use the '/p' switch if you are redirecting; the system will appear to hang when indeed it's simply waiting for you to hit a key.

HTH

Collapse -

Dos Command for MDB files on a drive

by ideafixer In reply to Dos Command for MDB files ...

Thanks for the explaination.

Collapse -

Dos Command for MDB files on a drive

by ideafixer In reply to Dos Command for MDB files ...

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums