How to move lines up and down (change order) in Notepad++

24

2

I have a text file with containing links and I want to change the order of them.

Can I automate this or do I have to do it manually?

My file is like this:

http;//filefactory.com/file/xxxxxxxxxxxx
http;//rg.to/file/xxxxxxxxxxxxxxxxxxxxxxxxxx
http;//clicknupload.com/xxxxxxxxxxxx
http;//ul.to/xxxxxxxx
http;//uptobox.com/xxxxxxxxxxxx

http;//filefactory.com/file/xxxxxxxxxxxx
http;//rg.to/file/xxxxxxxxxxxxxxxxxxxxxxxxxx
http;//clicknupload.com/xxxxxxxxxxxx
http;//ul.to/xxxxxxxx
http;//uptobox.com/xxxxxxxxxxxx

and so on........

I want to change order so that link order is like:

http;//rg.to/file/xxxxxxxxxxxxxxxxxxxxxxxxxx
http;//filefactory.com/file/xxxxxxxxxxxx
http;//clicknupload.com/xxxxxxxxxxxx
http;//uptobox.com/xxxxxxxxxxxx
http;//ul.to/xxxxxxxx

http;//rg.to/file/xxxxxxxxxxxxxxxxxxxxxxxxxx
http;//filefactory.com/file/xxxxxxxxxxxx
http;//clicknupload.com/xxxxxxxxxxxx
http;//uptobox.com/xxxxxxxxxxxx
http;//ul.to/xxxxxxxx

and so on ........

Doktor-X

Posted 2015-06-27T08:29:22.207

Reputation: 241

no solution ??? – Doktor-X – 2015-07-01T14:22:49.433

Since the link order in your original file follows the same pattern, I personally would record a macro in Excel to change the order of the links and run the macro on each of the paragraphs. It's still a bit manual and certainly not a suitable solution for 30,000 records but it may speed things up a little bit. Just a thought... – BustedSanta – 2015-07-01T17:08:01.077

Answers

49

The hot-keys to move lines up and down respectively are Ctrl+Shift+andCtrl+Shift+

enter image description here

Elijah W. Gagne

Posted 2015-06-27T08:29:22.207

Reputation: 621

7That ridiculous animated gif is complete unnecessary ...and completely awesome +1 !! – Jonathan – 2017-06-01T19:08:38.000

There are plenty of easy tools that you can use to create a GIF like that almost as quickly as using the Snipping Tool :) – Juha Untinen – 2017-12-15T13:36:04.680

@Elijah : what tool did you use to make this gif? – Luke – 2018-01-15T06:49:12.780

2

@LongTTH Check out http://www.screentogif.com/

– Elijah W. Gagne – 2018-01-16T12:45:18.553

2Note that this also works for multiple lines - just select the lines and move up/down to move the whole block around. Personally, I change the mapping to Alt+Up/Down to make it work the same as in eclipse. – Amos M. Carpenter – 2018-11-27T03:18:12.563