|
|
|
|
|
- Displaying in a List Box control the short names of the files present in a directory
Displaying in a List Box control the short names of the files present in a directory The following code is used to: - store in an array the name of the files found in a directory (ArrayPath),
- display in a List Box control the short names of the files present in a directory (LIST_ListShortName).
PathDirFile is string
ResShortName is string
ArrIndex is int = 0
LoopSubscript is int
ArrayPath is array
PathDirFile = fDir("C:\MyDirectories\*.*", frFile)
WHILE PathDirFile <> "" THEN
ArrSubscript++
ArrayPath[ArrSubscript] = PathDirFile
PathDirFile = fDir("")
END
FOR LoopSubscript = 1 TO ArrSubscript
ResShortName = fShortName(ArrayPath[LoopSubscript])
IF ResShortName = "" THEN
Error(ErrorInfo(errMessage))
ELSE
ListAdd(LIST_ListShortName, ResShortName)
END
END
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|