Task

Walk a given directory and print the names of files matching a given pattern.

(How is "pattern" defined? substring match? DOS pattern? BASH pattern? ZSH pattern? Perl regular expression?)


Note: This task is for non-recursive methods.   These tasks should read a single directory, not an entire directory tree.

Note: Please be careful when running any code presented here.



Related task

   Walk Directory Tree   (read entire directory tree). 


 
Module Show_Files_Standard {
      \\ we get more (include hidden too)
      Module InnerWay (folder_path$, pattern$){
            olddir$=dir$
            dir folder_path$
            \\ clear menu list
            Menu
            \\ + place export to menu, without showing
            \\ ! sort to name
            files ! + pattern$
            If MenuItems>0 then {
                  For i=1 to MenuItems {
                        Print Menu$(i)+".exe"
                  }
            }
            dir olddir$
      }
      InnerWay "C:\Windows","*.exe"
}
Show_Files_Standard
 