From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit Text File Size

I am logging values to a number of spreadsheet files (200) over time.

I want to limit the file size (to either a number of lines or a particular size?) so I don't end up filling up the disk if the files aren't checked for a while.

Is there a (simple?) way to limit file size, a bit like creating a FIFO buffer of a particular size?

Thanks-in-relative-ignorance,
Phil
Phil
0 Kudos
Message 1 of 3
(2,430 Views)
Hi Phil

In a self-written log-library, first I check the size of the log-file. If it exceeds a certain size, I copy it to a backup-file and delete it afterwards. Then a new log-file is created.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 3
(2,429 Views)
Thanks Thomas

I'll check the file size using the file info VI and work it from there.

I knew there would be simple solution.

Cheers
Phil
0 Kudos
Message 3 of 3
(2,419 Views)