Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File with 0 bytes
Message
De
05/11/2002 16:04:51
 
 
À
05/11/2002 15:36:37
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00719046
Message ID:
00719057
Vues:
16
Steven,

Without seeing the code that is creating the file, it is hard to say why the file is still open...but before you copy the file you can do use fopen() to attempt to open it (of course you need to fclose() it before the copy). Put can put the fopen() attempts in a loop, and set a maximum number of tries.

Maybe a sleep delay would help, but I would still try to fopen() the file before the copy:
declare Sleep in Win32API integer nMilliseconds
=Sleep(5000)  && 5 seconds
>I am using a piece of code to manipulate MSProject and print out file using Acrobat Distiller. The Distiller files the result to the local C:\.. drive. I then in the same routine copy file the file onto a network directory for automated email purposes. The trouble I am having is that sometimes the file copied is 0 bytes. The file in the c:\.. directory is fine and this does work some of the time. It's like the copy file part of the code runs before the PDF file is through if that is possible. Maybe a timeing issue. Please help.
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform