Digital Camera and pen drive

P

Principiante

First of all, pardon my bad English.

My problem is that in my aplications I make copys of security for the
data in a usb pen drives. When you connect a pen drive, appears a new
drive unit (for example F: ). Well, in the customers computers I have
seen what unit letter appears and I have put it in the code to make the
copy directly.

The problem is that, if the customer connect a digital camera before
than the pen drive, the camera creates the "new drive unit" that I have
in the code.

The idea is to diference or to know wich kind of device is in any drive
unit.

I have used this code:

'**************************************************

Dim FsoFile As Object 'Tipe FileSystemObject
Dim Unidad As Object 'Tipe UNidad(Drive)
Set FsoFile = CreateObject("Scripting.FileSystemObject")
For Each Unidad In FsoFile.Drives

If Unidad.drivetype = 1 Then
'Floppy Disk
MsgBox "DriveType = " & Unidad.drivetype
MsgBox "Path = " & Unidad.Path
MsgBox "Driveletter " & Unidad.driveletter
MsgBox "Isready = " & Unidad.IsReady
MsgBox "Totalsize = " & Unidad.Totalsize
MsgBox "Filesystem = " & Unidad.FileSystem

End If
If Unidad.drivetype = 2 Then
'Hard disk
MsgBox "Hard Disk " & Unidad.driveletter
End If
If Unidad.drivetype = 4 Then
'CD/DVD
MsgBox "CD/DVD " & Unidad.driveletter
End If

Next
Set FsoFile = Nothing

'*****************************************************

The problem is that the camera and the pen drive are DriveType = 1 and
FileSystem = FAT to me. I can't diference the devices with the Totalsize
because they can be the same. If someone want to prove and tell what is
the result....

Well, if someone knows how to diference the devices or any other idea...

Thanks.

Principiante.
 
D

Douglas J. Steele

I'm not sure there is a solution to this problem, and even if there was,
what would you do in the situation where there are 2 pen drives attached to
the machine?

I think you'll have to prompt the user to ask which drive letter to use.
 
P

Principiante

Yes, to ask the drive letter is the solution but the problem is the
customer. To learn what is the letter when it can be connected a digital
camera, pen drive or other...

If there are two pen drives at the same time, the problem is for the
customer. I make the copy in one of them.

Principiante.

Douglas J. Steele escribió:
 

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