LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to cut big text file into several small text files?

Solved!
Go to solution

Hi,

 

I have text files that are 2.2 GB in size the only program I could get to open it was UltraEdit , I tried the use of the block and the count to 100000 lines but again it stalled. I have only been playing with it for a day and its not a easy one to solve . I tried using the file position but had no success , I am planning on trying it again today as you have raised teh questions in my mind on using the hjsplitter. I trailed the splitter on a file I made by basically copying numbers into notepad then breaking it up and reading the smaller files but again the question is "how do I know if it working on my 2.2 GB text file  and the answer is I don't Know !!

 

If you know of a example that deals directly with the problem please post it or let me know , I will try again today to break up the file into smaller chunks , The set file position VI seems to be the answer in any of the forums I will spend the day trying to get it to work . Thanks for the post , I was hoping someone would leave a little feed back for me to let me know there feelings .

 

Thanks again

 

 

Rob

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Using labview since LV 8.6 , Great Stuff 🙂
0 Kudos
Message 11 of 27
(3,526 Views)

Hi Robert,

 

you could use the standard/basic file functions as shown above.

Even with LV7.1 (which only supports I32 filepointers) I was able to read data from files >2GB... (It also helps to stay with very basic functions like reading a certain count of chars instead of searching for EOL chars.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 27
(3,524 Views)

GerW,

 

Thanks for the help, up and running I think , I have attached the program I created to do the cutting . If you have a chance please have a look at it , I really need to thank you, a post would have been the best way to finish yesterday at three o clock Smiley Happy , but I am still new to LV and my coding might not be up to scratch and hope you can make sence of my VI.

 

Again thanks for the help

 

Rob

Using labview since LV 8.6 , Great Stuff 🙂
0 Kudos
Message 13 of 27
(3,504 Views)

Back again ,

 

My first post sorry missing a vi for the program

 

Thanks

 

Rob

Using labview since LV 8.6 , Great Stuff 🙂
0 Kudos
Message 14 of 27
(3,496 Views)

Hi Robert,

 

just looked at your VI.

After cleaning up and changing some parts it seems to work quite ok.

 

But:

- still buggy (no error handling for instance)

- change to a different architecture needed, like state machine

- remove all those sequence structures, they aren't needed at all

- btw. that are sequence frames, not cases!

- always use a timing in UI polling loops to avoid CPU hogging

- why don't you use the standard file dialog and instead use some (more than one!) subVIs with a (IMHO) ugly UI?

- why don't you use the standard feature of "show FP when called" and some property nodes instead?

- changing text size in the BD doesn't has any impact on FP settings and only reduces readability of your VI

- I don't like hiding and showing of FP elements, the user might get irritated from that - there's an "enable" property for such tasks

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 27
(3,488 Views)

GerdW,

 

Thanks for the help , I am still new to LV even after a year and a bit of using it on and off but its great to get a little advice on structure.

 

Thanks Again Smiley Very Happy

 

Rob C

Using labview since LV 8.6 , Great Stuff 🙂
0 Kudos
Message 16 of 27
(3,485 Views)

Hi GerdW,

 

Can you save this in LV 6.1 format?  I have a similar issue and I would like to look at how this program works, but I do not have LV 9.0

 

Thanks!

 

Hunter

0 Kudos
Message 17 of 27
(3,446 Views)

Sorry, I meant Version 8.6.....

0 Kudos
Message 18 of 27
(3,439 Views)

Hi amswak,

 

here's the latest VI in LV8.6 - but all comments from above are still valid!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 27
(3,428 Views)

Thank you!  I have some massive TDMS data files (>4GB) which can not be opened due to memory limitations, so I need to split them into smaller files.  It helps to see how people have tackled similar problems in the past...

0 Kudos
Message 20 of 27
(3,398 Views)