mmurgas Posted July 18, 2013 Posted July 18, 2013 Hi all, I'm trying to show all files uploaded to the server in a directory XXXX , example: Folder123 / *. * -> Folder123/ file1.jpg Folder123/ file2.jpg Folder123/ file3.jpg UniServerModule.StartPath+'Folder123\'; ?????? Did anyone will have made?. In advance, Thanks mmurgas Quote
bruno-pere Posted July 18, 2013 Posted July 18, 2013 function FindFiles(searchstr: string; list: TStrings): boolean;var hn: THandle; fd: WIN32_FIND_DATA;begin Result := False; hn := FindFirstFile(PChar(searchstr),fd); if hn <> INVALID_HANDLE_VALUE then begin Result := True; list.Add(StrPas(fd.cFileName)); while FindNextFile(hn,fd) = True do list.Add(StrPas(fd.cFileName)); end; Windows.FindClose(hn);end; How to use: ComboBox.Items.Clear; FindFiles(folder+'*.jpg',ComboBox.Items); You can use any windows wildcards like: 'pr_uc_??????_.adt' Bruno Quote
mmurgas Posted July 19, 2013 Author Posted July 19, 2013 Many Thanks Bruno, was very useful regards mmurgas Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.