Sorting lines evenly in document

  • Hi,
    I have a music playlist file of 6000 songs that I am manually selecting artists and sorting, or distributing, evenly through the document.
    It is quite laborious.
    Is there a way to select all lines of one artist and then distribute them at a set line interval e.g. every 50 lines?

  • I’d have to suggest not with a regular expression (regex). You see regex doesn’t have a calculator function builtin so cannot make numerical calculations of the type required.

    Notepad++ does however have other plugins, MathPad etc. See
    for details. One of those might fit your need, I haven’t looked at any so cannot comment.

    I would say though that if you sorted the music based on song title it would give a somewhat random distribution of songs. Of course it won’t be perfect but I’d suggest most artists songs would be kept at least 2-3 songs apart so in playing it would sound random. And maybe random might even be better than evenly distributed where listeners would know every nth song would be by the same artist.


  • @David-Talbot

    Although it doesn’t help with the fixed-interval distribution, these links might assist with doing some random “sorting”:

    Really though, the OP is a rather specific and esoteric need…and that usually ends up with someone telling you to not depend upon Notepad++ being able to help, but rather grabbing a programming language of your choice and “having at it”.

Log in to reply