Other way then If FileExists over network

From: Willem van Isselmuden (isselmuden_at_home.nl)
Date: 12/15/03


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



Relevant Pages

  • Re: Copying A Folder and its contents to a network share automaticall
    ... TomJerzey wrote: ... He also wants his PST ... file copied up to the network share everytime he shuts down. ...
    (microsoft.public.windowsxp.basics)
  • frozen application
    ... I am on an in-house ... network now and computer in other room needs help. ... Everytime I open whatever (Internet, Folders, Notepad, ...
    (microsoft.public.windowsxp.general)
  • Re: Access runtime error
    ... >How did you install the software? ... Over a network share, ... >> Everytime I log onto my terminal server and try and ...
    (microsoft.public.win2000.termserv.apps)
  • applications frozen
    ... I am on an in-house ... network now and computer in other room needs help. ... Everytime I open whatever (Internet, Folders, Notepad, ...
    (microsoft.public.windowsxp.basics)
  • frozen application
    ... I am on an in-house ... network now and computer in other room needs help. ... Everytime I open whatever (Internet, Folders, Notepad, ...
    (microsoft.public.windowsxp.basics)