Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copyfile
Message
De
25/01/2008 08:58:44
 
 
À
24/01/2008 20:08:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01284907
Message ID:
01285486
Vues:
26
>>I am using VFP native command:
>>
>>COPY FILE FileName1 TO FileName2
>>
>>Is there a way to know whether the file has been copied, after
>>command is applied ?
>>
>>Moises
>
>A different way to skin the fox. Even checks to make sure the file copied exactly
>COPY FILE FileName1 TO FileName2
>
>TRY
>   IF FILETOSTR(FileName1) <> FILETOSTR(FileName2)
>      =MESSAGEBOX("Files not the same")
>   ENDIF
>CATCH
>   ** Most likely FileName2 does not exist
>   =MESSAGEBOX("Error")
>ENDTRY
That will work as long as the file(s) being copied and compared are not larger than about 16MB. While it may work for some larger files, it definitely will have problems on files over 100MB.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform