Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copyfile
Message
From
25/01/2008 08:58:44
 
 
To
24/01/2008 20:08:11
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01284907
Message ID:
01285486
Views:
25
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform