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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect folder empty

Status
Not open for further replies.

channelmaster

Technical User
Dec 9, 2001
52
PH
Hello! How do we know if the folder is empty. I used the code below to get the directory and i want to prompt the user that the folder chosen is empty.

mSelectdir = GETDIR("","Select Directory")

thanks for any help.
 
It's not clear whether you want to know if they didn't a directory (they canceled out) or they choose a directory, but it didn't have any files in it.

In the first case, just check the variable mSelectdir for EMPTY().

In the second, do an ADIR(aFiles, Addbs(mSelectdir)+"*.*") and if it will return the number of files in this directory.

Rick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top