LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

[CVI2015] CopyFile copy the file but still empty

Solved!
Go to solution

Hello, 

 

I have coded some line to zip files into one archive file (.zip) then I wanted to copy it to another folder. 

The problem is when I use CopyFile, the new copy file is created, but still at 0 Kb even if I checked the source file and it is not empty...

So randomly, I got few empty files, with no error (CopyFile return 0).

 

I'm not using windows API. 

The destination folder where I need to copy the file is on remote (drive). 

 

Can someone tell me why I got this ? 

 

Thanks,  

0 Kudos
Message 1 of 3
(3,045 Views)

When you created the source file did you flush the file buffer before closing the file?

0 Kudos
Message 2 of 3
(3,021 Views)
Solution
Accepted by topic author HoussamAz

Yes I did.

 

I found the problem : when the  software launch the copy process, sometimes the zipping cmd didn't finished to compress all files yet... So I synchronized this.

 

Thanks. 

0 Kudos
Message 3 of 3
(3,003 Views)