Microsoft KB Archive/101290
ADIR() on Novell Requires a File Mask on the D Option
The information in this article applies to:
Although the ADIR() function is network aware, when it is used with the D option to read a Novell network drive, you MUST use file masking in order to make Novell return the proper information. This file mask includes a drive letter (which is mapped in Novell) and a file extension. If a mask is not used, ADIR() will return a 0 (signifying a failure to find anything).
For example, the following function will return a 0 and the array "test" will be empty because no file masking is being used on mapped drive "X":
However, this function will return the number of subdirectories because file masking is being used on mapped drive "X":
More Information: The ADIR() function retrieves file and directory information for the specified skeleton into an array, and then returns the number of files. Information about each file or directory is placed in the array specified if the array exists. If the array does not exist, FoxPro automatically creates it. The third parameter of the ADIR() function is optional and is used to expand the search to include additional files or directories. The function returns the number of files that it finds or a 0 if the search was unsuccessful.
As mentioned above, the third parameter of the ADIR() function is used to expand the search to include additional information. If the third parameter passed is a "D", the information that is returned will be about all the subdirectories that are under the current directory or the skeleton (which can be optionally passed as the second parameter). The ADIR() function is also network aware, so it can be used to retrieve network file and directory information.
Additional reference words: FoxDos FoxWin 2.50 2.00 ADIR Novell novel KBCategory: kbprg KBSubcategory: FxnetworkNetware
Last Reviewed: June 27, 1995