1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Notepad ++ How to remove lines from to from

Discussion in 'General Programming Chat' started by mindmaster, Aug 8, 2011.

  1. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    I have a 1.200.000 lines.

    How can I remove lines from 1 to 1.000.000 with notepad++ or other?

    I need this for scrapebox, as it doesn't let me import list bigger than 1 million.

    Appreciated.
     
  2. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
  3. Frogserv

    Frogserv Regular Member

    Joined:
    Jun 21, 2011
    Messages:
    376
    Likes Received:
    180
    Occupation:
    Entrepreneur
    Location:
    Paris, FR
    Use search & replace with regex.
     
    • Thanks Thanks x 1
  4. schwarz

    schwarz Newbie

    Joined:
    Apr 29, 2010
    Messages:
    25
    Likes Received:
    8
    Never used notepad++, but with vim (DL: vim.org) it's really simple...
    Open the file, then make sure, you are in the "command mode" (if unsure, then press ESC), then
    Go to the first line:

    :1 [ENTER]

    Delete the first 1,000,000 lines:

    d1000000 [ENTER]

    Save the file:
    :w [ENTER]

    If something goes wrong... (undo):
    :u [ENTER]

    Hope this helps.
     
    • Thanks Thanks x 2
  5. _Chip_

    _Chip_ Senior Member

    Joined:
    Jun 28, 2009
    Messages:
    847
    Likes Received:
    256
    Occupation:
    Student
    Location:
    Depends on my vpn
    I am not sure about notepad++...
    but ...paste all in excel...
    drag the scrol bar to 1 millionth line ...
    select the 1 millionth line,
    now press ctrl + shift + home
    delete...
    now goto 1.000.001 th line ..
    press ctrl + shift + end ...
    copy >> paste in your text file
     
    • Thanks Thanks x 1
  6. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    I read about it but can't figure what's the specific code for regex.
     
  7. kazhkaz

    kazhkaz Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 19, 2010
    Messages:
    1,238
    Likes Received:
    369
    Doesn't excel have 65k line limit?
     
    • Thanks Thanks x 1
  8. Frogserv

    Frogserv Regular Member

    Joined:
    Jun 21, 2011
    Messages:
    376
    Likes Received:
    180
    Occupation:
    Entrepreneur
    Location:
    Paris, FR
    Previous version of Excel will not work I think.
    There was a limit to the number of lines
     
  9. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    Yes with excel doesn't work.

    Can you tell me the regex code for this?
     
  10. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    Great little soft.

    Worked in 2 seconds.

    Rep
     
  11. ekologic

    ekologic Registered Member

    Joined:
    Oct 25, 2010
    Messages:
    64
    Likes Received:
    2
    Occupation:
    Wanna be an autoblogger
    Location:
    in facebook
    or you can write a macro in notepad++ then you can specify to repeat that macro n times.
    write a macro which would delete a line then play at as much as you want
     
  12. Narrator

    Narrator Power Member

    Joined:
    Oct 5, 2010
    Messages:
    507
    Likes Received:
    396
    Occupation:
    Internet Marketing
    Location:
    /dev/null
    I use HJ-Split to split up large files. Try googling it.
     
  13. _Chip_

    _Chip_ Senior Member

    Joined:
    Jun 28, 2009
    Messages:
    847
    Likes Received:
    256
    Occupation:
    Student
    Location:
    Depends on my vpn
    who said excel can only support 65k lines? :O
    are you people still using microsoft excel XP ? :\
     
  14. Knoxgates

    Knoxgates Supreme Member

    Joined:
    Aug 9, 2008
    Messages:
    1,266
    Likes Received:
    918
    65k line restriction is in office 2003. Office 2007 supports 1 million lines
     
  15. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    Yes this is an idea.
    However I managed to do it quick with wim. Great little software.

    Is it able to split certain numbers of lines or just file size?

    Don't know if it can take it or not, it crashed 2 times trying to paste 1,3 million lines.

    I saved the VIM . org software for future use. :)
     
  16. Gradimir Stankovic

    Gradimir Stankovic Power Member

    Joined:
    Jan 10, 2010
    Messages:
    737
    Likes Received:
    845
    Location:
    404 not found
    Can't you just go to first line, select it, go to millionth line, hit shift and select it all? After that just cut or delete it, and there you go.
     
  17. seeplusplus

    seeplusplus Power Member

    Joined:
    Aug 18, 2008
    Messages:
    511
    Likes Received:
    163
    Is there a need for such a tool? I could create one in C++ pretty quickly.
     
  18. mindmaster

    mindmaster Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2010
    Messages:
    2,501
    Likes Received:
    1,136
    Location:
    at my new office
    No need.

    Problem solved.
     
    Last edited: Aug 9, 2011
  19. Baybo.it

    Baybo.it Registered Member

    Joined:
    Aug 9, 2011
    Messages:
    72
    Likes Received:
    39
    Occupation:
    Founder of Baybo.it
    Location:
    San Francisco
    Home Page:
    I'm really happy people are posting vim and emacs shortcuts -- they're really great editors. One good solution (which isn't ideal) would be to use Control + Shift + Up-Key to move a line up or Control + Shift + Up-Down to move the line down.

    Of course, as was suggested, vim and emacs have much nicer command bindings for common tasks like these, and the macro systems are gorgeous. Hope this helps!