You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns an array with the filenames. If there are no filesreturns an empty array.
5
+
Returns an array with the filenames. If there are no files, `FILES`returns an empty array. `exp` can contain the wildcards `*` and `?`. `exp` can include a path.
6
6
7
-
The directory listing, if assigned to a string, will create a string array. Each filename is assigned to its own element in the string array.
8
-
sample program example:
7
+
### Example 1: List all files in the current directory
9
8
10
-
~~~
9
+
```
10
+
FileNames = files("*.*")
11
11
12
-
20 a$=FILES("*.*")
13
-
30 n=LEN(a$)
14
-
40 FOR i = 0 to n-1
15
-
50 PRINT a$(i)
16
-
60 NEXT i
12
+
for f in FileNames
13
+
print f
14
+
next
15
+
```
17
16
18
-
~~~
17
+
### Example 2: List all files matching search string
0 commit comments