Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying files
Message
 
À
16/10/2000 07:37:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00429701
Message ID:
00429703
Vues:
46
>Whenever I copy a file from VFP to a server it freezes until the file is copied.
>
>Is there anyway of copying the file in the background to allow other programs to carry on running without the file copy interrupting.
>
>Thanks in advance
>Kev
Look at API #12708 from Ed
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
   STRING @SourceFileName, ;
   STRING @DestFileName, ;
   INTEGER bFailIfExists
IF CopyFile(cMySourceFileName,cMyPortOrUNC,0) # 0
   *  It was copied
ELSE
   *  it wasn't
ENDIF
That copy's a file using the windows API interface.
I don't now if it lets processing go on.
If it doesn't then you can do the following.
Create a timer class, and let it in the timer event do the file copy.
Then you can go on working.
If you want to do it a little more universal then you can create a timer class with a cCommand property and let it run the cCommand at the timer event. Then you can use the class for other things too.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform