LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying File Size

Is there a way to display the size of a file from the disk on a front panel?
I'm writing data to the disk from a serial port, and i know the size of my file on the sending end, but I need a way to display the size of the file being written on the receiving end so i can create a progress bar for the download.... Any ideas/Suggestions?

thanks,
Jimmy
0 Kudos
Message 1 of 2
(2,474 Views)
To get the size of a file on disk, use the "File/Directory Info" function. See the attached screenshot. As far as creating the progress bar, it sounds like you'll have to first send the size of the complete file as known by the sender (by calling "File/Directory Info" on the sender end). Once the receiver gets the file size of the complete file, it can then periodically check the size of the file that is being saved on the receiver's disk--update your progress bar using those two numbers.
Message 2 of 2
(2,464 Views)