home *** CD-ROM | disk | FTP | other *** search
- /* listpattern.txed */
- arg duwindow
- OPTIONS results
-
- if duwindow = "FROM" then devstring = getenv("dufromdir")
- else devstring = getenv("dutodir")
-
- devstring = strip(devstring)
-
-
- x = request(200,200,"Type filename including wildcards below"," ",,,)
-
- if x = "" then exit
-
- loccolon = index(x,":")
-
- if loccolon ~=0 then listpat = x
- else listpat = devstring||x
-
- listpat = strip(listpat)
-
- call STATEF(listpat)
- parse var result type rest
-
- address command "list >VD0:DUFROMTEMPLISTING sort nodates "listpat
- LOAD "VD0:DUFROMTEMPLISTING"
-
- 'filelist/cleanlast'
-
- MSG listpat
- parse var listpat dev ":" rest
-
- if type = "FILE" then do
- listpat = reverse(listpat)
- parse var listpat files "/" dirstring
- dirstring = reverse(dirstring)"/"
- end
-
- else do
- listpat = reverse(listpat)
- locslash = index(listpat,"/")
- if locslash = 1 then dirstring = reverse(listpat)
- else do
- dirstring = reverse(listpat)
- if rest ~= "" then dirstring = dirstring"/"
- end
- end
-
- if duwindow = "FROM" then x = setenv("dufromdir",dirstring)
- else x=setenv("dutodir",dirstring)
-
- exit
-