Tech Tip: Getting the list of folders in a directory
PRODUCT: 4D | VERSION: 2004.4 | PLATFORM: Mac & Win
Published On: November 20, 2006
You can get the list of folders in a specified directory by using the FOLDER LIST command. As shown in the method below, the names of the folders in the pathname you pass (in the mPath) will be saved in the array (FoldersInDir):
C_TEXT(mPath;$1)
ARRAY TEXT(FoldersInDir;0)
mPath:=$1
FOLDER LIST(mPath;FoldersInDir)