halcyon627 Posted April 4, 2017 Report Share Posted April 4, 2017 I am wanting to be able to count the number of lines in a text file and put that amount into a variable. It seems so simple, but I can't figure it out. Is there an easy way to do this? Quote Link to comment Share on other sites More sharing options...
Samrae Posted April 5, 2017 Report Share Posted April 5, 2017 Try this: Variable Set Integer %N1% to 0 Text File Begin Process: "FileIn.txt" Variable Modify Integer: Inc (%N1%) Text File End Process // Here %N1% contains the number of lines Copy and paste this code: <IVAR2:01:01:0><BTFBEG:001:000001:000000:c:\Users\username\Documents\FileIn.txt><NMVAR:08:01:0:0000001:0:0000000><BTFEND><REM2:><REM2:Here %N1% contains the number of lines> Quote Link to comment Share on other sites More sharing options...
halcyon627 Posted April 5, 2017 Author Report Share Posted April 5, 2017 Okay I can definitely try this! After I use the script editor, where do I paste the code below? Do I paste that using the direct editor? I hope this works!! Quote Link to comment Share on other sites More sharing options...
halcyon627 Posted April 5, 2017 Author Report Share Posted April 5, 2017 Nevermind, I got this to work and it works perfectly! Thanks so much!! Quote Link to comment Share on other sites More sharing options...
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.