Sign in to follow this  
Followers 0
Glyco

Count lines and make text files

5 posts in this topic

hello

there are more than 5000000 lines in a text file with .txt ext.

we want to count first 100 or 200 lines and save in a new text file with name 1.txt

then count next 100 lines and save in 2.txt

doing so on...

and then when all the lines are sepreted in different and new files, script ends.

any ideas on how to start doing this?

i 've not touched autoit for much time...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Start with FileOpen(), FileReadLine(), FileWriteLine()

Edit: I wonder if AutoIt can open such a large file?? ...never tried :)

Edited by MrMitchell

Share this post


Link to post
Share on other sites

file size is 3.5mb & i don't know that how many lines are in there...

file have 8 characters long numbers on each line, so i guessed there 'll be too many lines

can you explain a bit more to make it easy and better automation?

thanks

Share this post


Link to post
Share on other sites

Yah it should work no problem...

It would be difficult to explain without making it confusing, but it would be really easy to do, maybe 20 lines or less. Why don't you give it a shot then post the code you end up with.

Share this post


Link to post
Share on other sites

Yah it should work no problem...

It would be difficult to explain without making it confusing, but it would be really easy to do, maybe 20 lines or less. Why don't you give it a shot then post the code you end up with.

I made a function today on another may be it can help you ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0