** END HEADER -- do not remove this line // // Generated on 2018-11-13 // parameter bModal local f f = new list_filesForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class list_filesForm of FORM with (this) onSize = class::FORM_ONSIZE onOpen = class::FORM_ONOPEN height = 22.1364 left = 35.4286 top = 2.5 width = 53.1429 text = "" endwith this.COMBOBOX1 = new COMBOBOX(this) with (this.COMBOBOX1) onChange = class::COMBOBOX1_ONCHANGE onOpen = class::COMBOBOX1_ONOPEN height = 1.0 left = 5.0 top = 2.0 width = 31.0 style = 1 // DropDown endwith this.LISTBOX1 = new LISTBOX(this) with (this.LISTBOX1) onSelChange = class::LISTBOX1_ONSELCHANGE height = 13.0 left = 5.0 top = 6.0 width = 44.0 id = 102 colorHighLight = "HighLightText/HighLight" endwith this.TEXTLABEL1 = new TEXTLABEL(this) with (this.TEXTLABEL1) height = 1.0 left = 5.0 top = 0.5 width = 18.0 text = "Removable Drives" endwith this.ENTRYFIELD1 = new ENTRYFIELD(this) with (this.ENTRYFIELD1) height = 1.0 left = 5.0 top = 20.0 width = 44.0 value = "" endwith this.TEXTLABEL2 = new TEXTLABEL(this) with (this.TEXTLABEL2) height = 1.0 left = 16.0 top = 4.0 width = 21.0 text = "Form can be resized" endwith function COMBOBOX1_onChange() form.entryfield1.value = '' aFiles = new array() oFiles = new FileRecurser(substr(this.value,1,at(':',this.value) )) oFiles.processFile := {|d,f|; aFiles.Add(d + f)} oFiles.search() form.listbox1.datasource = 'array aFiles' return function COMBOBOX1_onOpen() this.value = 'Select drive' return function LISTBOX1_onSelChange() form.entryfield1.value = this.value return function form_onOpen() set procedure to :duflp:miscWSH.prg set procedure to :dUFLP:FileRecurser.cc set procedure to :duflp:miscapi.prg aDirs = new array() fso = new OleAutoClient("Scripting.FileSystemObject").drives a = new array(fso.count,2) for n = 0 to fso.count-1 a[n+1,1] = fso[n].path a[n+1,2] = getDriveType(fso[n].driveType) next for n = 1 to a.size step 2 if a[n+1] = 'Removable' cVol = getlabel(a[n]) // get volume label aDirs.add(a[n]+' '+cVol) endif next form.combobox1.dataSource = 'array aDirs' return function form_onSize(nSizeType, nWidth, nHeight) form.listbox1.width = this.width - 10 form.listbox1.height = this.height - 10 form.entryfield1.width = this.width - 10 form.entryfield1.top = form.height - 2 return endclass