Kas Posted November 8, 2012 Report Share Posted November 8, 2012 Hello. I'm trying to implement a large binary file splitter. With relatively small files (>200 MB), this seems to work ok. But with large files (<1 Gb), it fails. Randomly, I see a file being created with 0 KB size on it (attached picture). The problem seems to go away if I put a delay of 03s inside the loop, but anything less and the problem persists. I'm not sure if I'm doing something wrong (most likely) or if its a labview bug. Thanks Kas 1 Quote Link to comment
Mads Posted November 8, 2012 Report Share Posted November 8, 2012 No such error when I run it (3GB files even). I removed the wait function altogether. Running LV 2012f3 32 bit. It's not just an update issue , if you hit F5 or reopen the directory the OS has not updated the number to its correct size? Does it happen on a number of different files and sizes (above 1 GB)? 1 Quote Link to comment
crossrulz Posted November 8, 2012 Report Share Posted November 8, 2012 Just a general comment: There is no need to set your file position inside of the loop. The position increments during the read. After a read, the position will be set to the next byte, so the the next read will start where the previous left off. 1 Quote Link to comment
Kas Posted November 8, 2012 Author Report Share Posted November 8, 2012 (edited) It's not just an update issue , if you hit F5 or reopen the directory the OS has not updated the number to its correct size? Nice, that was it. I was monitoring the directory, but forgot to refresh. Everything seems to be there. Thanks Just a general comment: There is no need to set your file position inside of the loop. The position increments during the read. After a read, the position will be set to the next byte, so the the next read will start where the previous left off. Didn't know about this little trick. It certainly simplyfies things. Thanks again. Kas Edited November 8, 2012 by Kas Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.