Other way then If FileExists over network
From: Willem van Isselmuden (isselmuden_at_home.nl)
Date: 12/15/03
- Next message: J French: "Re: Question re tObject and lists"
- Previous message: Martin Strand: "Re: Question re tObject and lists"
- Next in thread: Maarten Wiltink: "Re: Other way then If FileExists over network"
- Reply: Maarten Wiltink: "Re: Other way then If FileExists over network"
- Reply: Willem van Isselmuden: "Re: Other way then If FileExists over network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 15 Dec 2003 17:26:37 +0100
Hello,
i made a little program that copies a file from another computer in the
network to mine.
I want this to happen everytime I start up my computer, but when the other
computer
is turned off the copy failes (logically) but the program tries very long to
copy it before saying
he can't find the file.
I do this the following way
******************************************
if FileExists('\\Cc43778-b\MUZIEK (E)\Movie Database\Movie Database.mdb')
then
begin
CopyFile(PChar('\\Cc43778-b\MUZIEK (E)\Movie Database\Movie
Database.mdb'), PChar('\\Cc43778-a\Moviez (D)\Movie DataBase\Movie
Database.mdb'), False);
strDatum := FormatDateTime('d/mmm/yyyy', Now) ;
strTijd := FormatDateTime('HH:MM', Now) ;
strTotaal := strDatum + ' om ' + strTijd ;
AssignFile(myFile, '\\Cc43778-a\Moviez (D)\Movie
DataBase\Backup_Log.txt');
Append(myFile) ;
WriteLn(myFile, strTotaal) ;
CloseFile(myFile)
end
else
ShowMessage('Bestand is niet aanwezig, computer is
waarschijnlijk uitgeschakeld!');
end;
******************************************
Is there a better way instead of the If FileExists way?
Because it takes al long time before he finds out the file doesnt exists if
the other computer is turned of
I hope someone has a solution for me
Greetings Willem
- Next message: J French: "Re: Question re tObject and lists"
- Previous message: Martin Strand: "Re: Question re tObject and lists"
- Next in thread: Maarten Wiltink: "Re: Other way then If FileExists over network"
- Reply: Maarten Wiltink: "Re: Other way then If FileExists over network"
- Reply: Willem van Isselmuden: "Re: Other way then If FileExists over network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|