So, if everything you do is looking for files, you can do it with listbox.DirList (), or if you want to do it without being bound to a window or control, you can call WinAPI functions to do this:
Function long FindFirstFileW (ref string filename, ref os_finddata findfiledata) library "KERNEL32.DLL" alias for "FindFirstFileW" Function boolean FindNextFileW (long handle, ref os_finddata findfiledata) library "KERNEL32.DLL" alias for "FindNextFileW"
where os_finddata is defined as
unsignedlong ul_fileattributes os_filedatetime str_creationtime os_filedatetime str_lastaccesstime os_filedatetime str_lastwritetime unsignedlong ul_filesizehigh unsignedlong ul_filesizelow unsignedlong ul_reserved0 unsignedlong ul_reserved1 character ch_filename[260] character ch_alternatefilename[14]
and os_filedatetime is defined as
unsignedlong ul_lowdatetime unsignedlong ul_highdatetime
If you need examples of how to use them, look in the PFC (Foundation PowerBuilder classes available on CodeXchange ) on the object (pfcapsrv. Pbl) pfc_n_cst_filesrvunicode.of_DirList (). (What is where these prototypes and structures are copied, BTW.)
Good luck
Terry
Terry source share