Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check a folder contents 1

Status
Not open for further replies.

jorgemc

Programmer
Jun 4, 2001
3
PT
How I can know if a folder is empty with VB 6.0?

Thks
JorgeMC Sorry about my bad english.

Jorge Carvalho
From the Sun of Portugal
 
Dim sFilePath as String

sFilePath = 'Folder you want to search

If FileExists(sFilePath & "*.*") Then
MsgBox "File exists."
else
MsgBox "No files Found."
End if


Public Function FileExists(strPath As String) As Integer
FileExists = Not (Dir(strPath) = "")
End Function
 
Tks.
The problem is solved. Sorry about my bad english.

Jorge Carvalho
From the Sun of Portugal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top