Hi Guy's i am trying to copy a jpg image from a camera SD card, and camFile is coming up with bad file name or number
When i hover over the debug line (in Bold) the camFile is DSC*.* and not the rest of the file name ?
I currently have an image called DSC00482 but the wildcard of *.* doesn't appear to work ?
Code:
If Me.cboImages = "From Camera" ThenCustName = Me.cboDealerIndex7
DriveSelect = Forms!frmMainMenu!cboDrive
CamPath = DriveSelect & "\DCIM\101MSDCF\"
CamFile = "DSC & *.*" IS WILDCARD CORRECT
Dest = "Collections"
AccPath = "T:\My Customer\DMT Images\" & Dest & "\" & CustName
imgPath = "T:\Images\" & Dest & "\" & CustName & "\"
If Dir(imgPath, vbDirectory) = "" Then
MkDir (imgPath)
Else
DoCmd.CancelEvent
End If
If Dir(AccPath, vbDirectory) = "" Then
MkDir (AccPath)
Else
DoCmd.CancelEvent
End If
NewName = CustName & "-" & Format(Now(), "dd-mm-yy") & ".jpg"
Name CamPath & CamFile As imgPath & NewName (camFile is bad file name or number)
'Clear Camera
Set FSO = CreateObject("Scripting.FileSystemObject")
Set ObjFiles = FSO.GetFolder(CamPath).Files
imgQty = ObjFiles.Count
x = 1
Do Until CamFile = vbNullString
CamFile = Dir
x = x + 1
Loop
MsgBox ("Camera SD Card Is Now Empty, Please Remove SD Card From Computer"), vbInformation + vbOKOnly, "SD CARD NOW CLEAR"
End If