Batch checking mountable devices

H

Howard Brazee

At work I have W2K but no administrator privileges.

I have some batch files that copy some data to a Dazzle memory card reader. But
I have trouble connecting to this - if I log in too fast, I am always missing
the connection to it or to LAN drives.

I just remembered a utility that I have had for some time:

ISDEVTST checks for devices and passes back return codes Googling, I found batch
files using it:
http://www.flash.net/~hoselton/pubs/mah_003.txt
http://www.robvanderwoude.com/

This works to tell me if the device driver has been loaded. But it doesn't
tell me if there is anything mounted.

I tried the following .bat segment:
C:\BELFRY>c:

C:\BELFRY>cd \belfry

C:\BELFRY>ISDEV.com I:

C:\BELFRY>If ErrorLevel 1 ECHO no I:

C:\BELFRY>If Not ErrorLevel 1 ECHO I:
I:

C:\BELFRY>dir i:
The device is not ready.

C:\BELFRY>If Not ErrorLevel 1 ECHO dir i:

C:\BELFRY>If Not ErrorLevel 1 pause

C:\BELFRY>pause
Press any key to continue . . .


How can I determine whether the device is mounted?
 
J

J

Find a copy of WAIT.EXE and drop it in with a 30 - 45
second timer setup. It is a batch commandline utility
that I use when needed.

Otherwise drop a small .txt file on the I: drive and do a
check that the file exists then use wait and loop until it
finds the file.

J
 

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