General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2000 Server
>>Hi. I am doing an Array of a folder's contents. How do I test for an empty directory?
>Thanks, Randy
>If you use adir(), check the return value. It will return the number of files found. From help: "If the array exists and ADIR( ) returns 0 because no matching files are found, the array remains unchanged. If the array doesn't exist and ADIR( ) returns 0, the array isn't created."
ADIR() also returns the names of the subdirectories -- so there may not be any files but can have a return >0 due to subdirectories.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only