![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Mar 2010
Posts: 4
Rep Power: 0
![]() |
Performing a file search, and then uploading results to a backup server
hi
i am writing a program for a client to upload files related to his management software to a backup FTP on the local network. I am using Indy Componenents to make the FTP Connection, i have a TidFTP component on the form with all the FTP connection information in. The Form succesfully connects/disconnects and uploads single files to the FTP. i need to know how to write code to perform a search for files with the extension of .RGPJ on Local Drive X:\ and then upload the found files to the server. i can upload a single RGPJ file using IDFtp1.Put('LocalFile', 'RemoteFile');but im stuck for searching for multiple files and uploading them. anybody out here kind enough to shed some light on the subject? |
|
|
|
|
|
#2 |
|
Trying to be a Real Coder
|
Re: Performing a file search, and then uploading results to a backup server
Please visit :
__________________
just a drop of dew in the morning |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Mar 2010
Posts: 4
Rep Power: 0
![]() |
Re: Performing a file search, and then uploading results to a backup server
hi
i still dont have exactly what i need but i think im close now, the code im using for the search is below. procedure FindAll (const Path: String;
Attr: Integer;
List: TStrings) ;
var
Res: TSearchRec;
EOFound: Boolean;
begin
EOFound:= False;
if FindFirst(Path, Attr, Res) < 0 then
exit
else
while not EOFound do begin
List.Add(Res.Name) ;
EOFound:= FindNext(Res) <> 0;
end;
FindClose(Res) ;
end;and to search im using FindAll('X:\Test\*.rgpj*',faAnyFile,ListBox1.Items);however this code i have only seems to list files in the current directory, i need a function that searches the entire drive including subfolders etc, and then lists all the .rgpj files it finds. http://www.festra.com/eng/snip04.htm the procedure listed on there i actually cannot get to return any results at all when im testing it. would somebody mind helping me out with writing my own function to search for the files i need over an entire drive. |
|
|
|
|
|
#4 |
|
Trying to be a Real Coder
|
Re: Performing a file search, and then uploading results to a backup server
delphi Syntax (Toggle Plain Text)
FindFiles is recursive. See part of FindFIles' code It is for search the entire folders
__________________
just a drop of dew in the morning |
|
|
|
|
|
#5 |
|
Newbie
Join Date: Mar 2010
Posts: 4
Rep Power: 0
![]() |
Re: Performing a file search, and then uploading results to a backup server
hi
when my application is using the search function i cannot move my application window or interact with any other button. how can i make my application responsive while it is searching for files in the background. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|