I am still attempting to read media files from a media drive.
I have the code
pic_getfiles() is my own prg
This works fine for a known drive with a card in it.
if a drive letter for a media card reader does not have a card in it, this line (<<<<<< )gives an error.
<<<<<< = IF validpath(cDRIVE +':\DCIM\')
How can I test if a media card reader drive has a card in it to enable a check to be made for the DCIM folder?
Regards
Bryan
I have the code
Code:
FOR I = 4 TO 26 && Loop through drive letters D thru Z
cDRIVE = CHR(I + 64)
nDTYPE = DRIVETYPE(cDRIVE) && Determine drive type
IF nDTYPE = 2 && Floppy drive or card reader slot
IF validpath(cDRIVE +':\DCIM\') <<<<<<<<<<
=pic_getfiles(cDRIVE +':\DCIM\')
ENDIF
ENDIF
ENDFOR
pic_getfiles() is my own prg
This works fine for a known drive with a card in it.
if a drive letter for a media card reader does not have a card in it, this line (<<<<<< )gives an error.
<<<<<< = IF validpath(cDRIVE +':\DCIM\')
How can I test if a media card reader drive has a card in it to enable a check to be made for the DCIM folder?
Regards
Bryan