The iterators in the OS module such as walkFiles use a filename pattern as
input.
The OS module documentation says:
iterator walkFiles(pattern: string): string Iterate over all the files that
match the pattern.
What sort of pattern language is used for the pattern string ?
I have the following code which produces below output on a Windows machine.
What is happening here ?
import os
# This lists all the files echo "File Pattern: T*.txt "
for filename in walkFiles("T*.txt"):
echo filename
echo ""
# This produces no output echo "File Pattern: T??????.txt "
for filename in walkFiles("T??????.txt"):
> echo filename
echo ""
# This again lists all the files echo "File Pattern: T???????.txt "
for filename in walkFiles("T???????.txt"):
> echo filename
echo ""
File Pattern: T*.txt T77D20181215-clean.txt T77D20181215-tsv.txt
T77D20181215.txt temp-csv-clean.txt temp-csv-tsv.txt temp-csv.txt temp-tab.txt
testdata.txt
File Pattern: T??????.txt
File Pattern: T???????.txt T77D20181215.txt T77D20181215-tsv.txt
T77D20181215-clean.txt temp-csv.txt temp-csv-tsv.txt temp-csv-clean.txt
temp-tab.txt testdata.txt