Is FloppyDisk empty?
Hi All,
I am having a bit of trouble writing some code which:
Check if floppy disk is empty?
if true then
..................
else
..............
any thoughts would be appreciated.
[227 byte] By [
mp_direct] at [2007-11-11 7:14:39]

# 2 Re: Is FloppyDisk empty?
i think i have not explained it properly,
in my program the user is asked to insert a floppydisk when exporting data.
Before the program exports the txt file to the floppy, i want the program to make sure the floppy disk is empty or else display message box "delete files on disk before export!"
Any thoughts
# 4 Re: Is FloppyDisk empty?
Not sure, i have done this, but keep kettin errors:
Dim retval As String
retval = Dir$("A:\")
If retval.IsEmpty = True Then
MsgBox "disk empty..."
Else
MsgBox "disk full..."
End If
Any thoughts
# 5 Re: Is FloppyDisk empty?
Rather than If retval.IsEmpty = True, try:
If retval = ""
or
If Len(retval) = 0
Also, you should include a file specification in the Dir() call:
retval = Dir$("a:\*.*")
And if you want to detect directories in addition to files, you should do this:
retval = Dir$("a:\*.*", vbDirectory)