m3u playlist remove directories











up vote
0
down vote

favorite












Simple question here but I'm guessing there's not such a simple answer.



I'm moving m3u playlists from my PC to my smart phone therefore I mass change the directories to suit (see below) as the files structures on both devices are identical.




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3




My new method means that all of the files will be in the main music directory on my smart phone rather than using the file structure of my PC. Therefore my playlists now need to look like this:




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicAvicii - The Nights (Lyric Video).mp3




Adding the "..My Music" directory at the start is obviously easy, but how do I remove the directories, leaving only the file names when there are obviously varying lengths of directories. This one has 3 folders below the "Music" folder however some could be 4, 5 etc.



I could do this manually however when I have many playlists with 300+ songs on each I'm not liking that idea. Can anyone think of a way of doing it on mass?



I've toyed around with pasting the text into Excel's and using it's "Text to Columns" feature but I can't think of way of using this where I wouldn't have to visit each line the same as raw text editing.



Thanks in advance,
Dan










share|improve this question






















  • you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
    – Ale
    Jan 10 '15 at 12:18















up vote
0
down vote

favorite












Simple question here but I'm guessing there's not such a simple answer.



I'm moving m3u playlists from my PC to my smart phone therefore I mass change the directories to suit (see below) as the files structures on both devices are identical.




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3




My new method means that all of the files will be in the main music directory on my smart phone rather than using the file structure of my PC. Therefore my playlists now need to look like this:




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicAvicii - The Nights (Lyric Video).mp3




Adding the "..My Music" directory at the start is obviously easy, but how do I remove the directories, leaving only the file names when there are obviously varying lengths of directories. This one has 3 folders below the "Music" folder however some could be 4, 5 etc.



I could do this manually however when I have many playlists with 300+ songs on each I'm not liking that idea. Can anyone think of a way of doing it on mass?



I've toyed around with pasting the text into Excel's and using it's "Text to Columns" feature but I can't think of way of using this where I wouldn't have to visit each line the same as raw text editing.



Thanks in advance,
Dan










share|improve this question






















  • you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
    – Ale
    Jan 10 '15 at 12:18













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Simple question here but I'm guessing there's not such a simple answer.



I'm moving m3u playlists from my PC to my smart phone therefore I mass change the directories to suit (see below) as the files structures on both devices are identical.




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3




My new method means that all of the files will be in the main music directory on my smart phone rather than using the file structure of my PC. Therefore my playlists now need to look like this:




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicAvicii - The Nights (Lyric Video).mp3




Adding the "..My Music" directory at the start is obviously easy, but how do I remove the directories, leaving only the file names when there are obviously varying lengths of directories. This one has 3 folders below the "Music" folder however some could be 4, 5 etc.



I could do this manually however when I have many playlists with 300+ songs on each I'm not liking that idea. Can anyone think of a way of doing it on mass?



I've toyed around with pasting the text into Excel's and using it's "Text to Columns" feature but I can't think of way of using this where I wouldn't have to visit each line the same as raw text editing.



Thanks in advance,
Dan










share|improve this question













Simple question here but I'm guessing there's not such a simple answer.



I'm moving m3u playlists from my PC to my smart phone therefore I mass change the directories to suit (see below) as the files structures on both devices are identical.




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3




My new method means that all of the files will be in the main music directory on my smart phone rather than using the file structure of my PC. Therefore my playlists now need to look like this:




PC: A:DANIELMy MusicArtists A - JAAviciiAvicii - The Nights (Lyric Video).mp3



Phone: ..My MusicAvicii - The Nights (Lyric Video).mp3




Adding the "..My Music" directory at the start is obviously easy, but how do I remove the directories, leaving only the file names when there are obviously varying lengths of directories. This one has 3 folders below the "Music" folder however some could be 4, 5 etc.



I could do this manually however when I have many playlists with 300+ songs on each I'm not liking that idea. Can anyone think of a way of doing it on mass?



I've toyed around with pasting the text into Excel's and using it's "Text to Columns" feature but I can't think of way of using this where I wouldn't have to visit each line the same as raw text editing.



Thanks in advance,
Dan







microsoft-excel itunes music playlists






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 10 '15 at 12:13









Daniel

31




31












  • you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
    – Ale
    Jan 10 '15 at 12:18


















  • you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
    – Ale
    Jan 10 '15 at 12:18
















you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
– Ale
Jan 10 '15 at 12:18




you can possibly do something using VBScript, or any programming language (would be only some lines of code in C/C++, do you have a compiler?)
– Ale
Jan 10 '15 at 12:18










2 Answers
2






active

oldest

votes

















up vote
0
down vote



accepted










On excel, write everything on one column, then on the second column, paste this formula to get what you need:



=CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))





share|improve this answer






























    up vote
    0
    down vote













    I have searched and asked about this question with no good results, until I somehow reached this Superuser dot com link. Wonderful. If you're not proficient with Excel, even the above might appear daunting, or won't work for you right out of the box.



    Here are my examples of before and after, and the slightly modified excel code I used.



    My desktop media center software created an .m3u playlist. The contents of the playlist is a simple ansi text editable dataset. Note, that it includes all the desktop PC drives and sub-folders. Some of the software players I tested for my mobile devices could not handle that below file structure. That's the point of the above Excel code.




    J:NTFS_1MP3_DDan Fogelberg - River of Souls - 08 - A Love Like
    This.mp3



    J:NTFS_1MP3_HHarry Chapin - Verities & Balderdash - 04 - 30,000
    Pounds Of Bananas.mp3



    J:NTFS_1MP3_HHarry Chapin - Story of a Life, disc 2 - 04 - 30,000
    Pounds of Bananas (live).mp3




    Here below, is the output of my slightly modified version of the above Excel code:




    Dan Fogelberg - River of Souls - 08 - A Love Like This.mp3



    Harry Chapin - Verities & Balderdash - 04 - 30,000 Pounds Of
    Bananas.mp3



    Harry Chapin - Story of a Life, disc 2 - 04 - 30,000 Pounds of
    Bananas (live).mp3




    In the case above, for my needs, even the default Music folder was removed. Now, with the file structure all 4 mobile software players I have tested work.



    For my case, the Excel code looks like:



    original code:



    =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))



    my code version:



    =CONCATENATE("",TRIM(RIGHT(SUBSTITUTE(A3,"",REPT(" ",LEN(A3))),LEN(A3))))



    Of course, on the back end, you still need to copy the second Excel column and paste it into a plain text editor, to save your results. Then, you need to rename the text file from .txt to .m3u.



    Hope it works out for you.






    share|improve this answer























    • Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
      – Rey Juna
      Nov 29 at 23:07











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f863037%2fm3u-playlist-remove-directories%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    On excel, write everything on one column, then on the second column, paste this formula to get what you need:



    =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))





    share|improve this answer



























      up vote
      0
      down vote



      accepted










      On excel, write everything on one column, then on the second column, paste this formula to get what you need:



      =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))





      share|improve this answer

























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        On excel, write everything on one column, then on the second column, paste this formula to get what you need:



        =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))





        share|improve this answer














        On excel, write everything on one column, then on the second column, paste this formula to get what you need:



        =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 10 '15 at 16:16

























        answered Jan 10 '15 at 12:26









        NuTTyX

        2,318614




        2,318614
























            up vote
            0
            down vote













            I have searched and asked about this question with no good results, until I somehow reached this Superuser dot com link. Wonderful. If you're not proficient with Excel, even the above might appear daunting, or won't work for you right out of the box.



            Here are my examples of before and after, and the slightly modified excel code I used.



            My desktop media center software created an .m3u playlist. The contents of the playlist is a simple ansi text editable dataset. Note, that it includes all the desktop PC drives and sub-folders. Some of the software players I tested for my mobile devices could not handle that below file structure. That's the point of the above Excel code.




            J:NTFS_1MP3_DDan Fogelberg - River of Souls - 08 - A Love Like
            This.mp3



            J:NTFS_1MP3_HHarry Chapin - Verities & Balderdash - 04 - 30,000
            Pounds Of Bananas.mp3



            J:NTFS_1MP3_HHarry Chapin - Story of a Life, disc 2 - 04 - 30,000
            Pounds of Bananas (live).mp3




            Here below, is the output of my slightly modified version of the above Excel code:




            Dan Fogelberg - River of Souls - 08 - A Love Like This.mp3



            Harry Chapin - Verities & Balderdash - 04 - 30,000 Pounds Of
            Bananas.mp3



            Harry Chapin - Story of a Life, disc 2 - 04 - 30,000 Pounds of
            Bananas (live).mp3




            In the case above, for my needs, even the default Music folder was removed. Now, with the file structure all 4 mobile software players I have tested work.



            For my case, the Excel code looks like:



            original code:



            =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))



            my code version:



            =CONCATENATE("",TRIM(RIGHT(SUBSTITUTE(A3,"",REPT(" ",LEN(A3))),LEN(A3))))



            Of course, on the back end, you still need to copy the second Excel column and paste it into a plain text editor, to save your results. Then, you need to rename the text file from .txt to .m3u.



            Hope it works out for you.






            share|improve this answer























            • Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
              – Rey Juna
              Nov 29 at 23:07















            up vote
            0
            down vote













            I have searched and asked about this question with no good results, until I somehow reached this Superuser dot com link. Wonderful. If you're not proficient with Excel, even the above might appear daunting, or won't work for you right out of the box.



            Here are my examples of before and after, and the slightly modified excel code I used.



            My desktop media center software created an .m3u playlist. The contents of the playlist is a simple ansi text editable dataset. Note, that it includes all the desktop PC drives and sub-folders. Some of the software players I tested for my mobile devices could not handle that below file structure. That's the point of the above Excel code.




            J:NTFS_1MP3_DDan Fogelberg - River of Souls - 08 - A Love Like
            This.mp3



            J:NTFS_1MP3_HHarry Chapin - Verities & Balderdash - 04 - 30,000
            Pounds Of Bananas.mp3



            J:NTFS_1MP3_HHarry Chapin - Story of a Life, disc 2 - 04 - 30,000
            Pounds of Bananas (live).mp3




            Here below, is the output of my slightly modified version of the above Excel code:




            Dan Fogelberg - River of Souls - 08 - A Love Like This.mp3



            Harry Chapin - Verities & Balderdash - 04 - 30,000 Pounds Of
            Bananas.mp3



            Harry Chapin - Story of a Life, disc 2 - 04 - 30,000 Pounds of
            Bananas (live).mp3




            In the case above, for my needs, even the default Music folder was removed. Now, with the file structure all 4 mobile software players I have tested work.



            For my case, the Excel code looks like:



            original code:



            =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))



            my code version:



            =CONCATENATE("",TRIM(RIGHT(SUBSTITUTE(A3,"",REPT(" ",LEN(A3))),LEN(A3))))



            Of course, on the back end, you still need to copy the second Excel column and paste it into a plain text editor, to save your results. Then, you need to rename the text file from .txt to .m3u.



            Hope it works out for you.






            share|improve this answer























            • Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
              – Rey Juna
              Nov 29 at 23:07













            up vote
            0
            down vote










            up vote
            0
            down vote









            I have searched and asked about this question with no good results, until I somehow reached this Superuser dot com link. Wonderful. If you're not proficient with Excel, even the above might appear daunting, or won't work for you right out of the box.



            Here are my examples of before and after, and the slightly modified excel code I used.



            My desktop media center software created an .m3u playlist. The contents of the playlist is a simple ansi text editable dataset. Note, that it includes all the desktop PC drives and sub-folders. Some of the software players I tested for my mobile devices could not handle that below file structure. That's the point of the above Excel code.




            J:NTFS_1MP3_DDan Fogelberg - River of Souls - 08 - A Love Like
            This.mp3



            J:NTFS_1MP3_HHarry Chapin - Verities & Balderdash - 04 - 30,000
            Pounds Of Bananas.mp3



            J:NTFS_1MP3_HHarry Chapin - Story of a Life, disc 2 - 04 - 30,000
            Pounds of Bananas (live).mp3




            Here below, is the output of my slightly modified version of the above Excel code:




            Dan Fogelberg - River of Souls - 08 - A Love Like This.mp3



            Harry Chapin - Verities & Balderdash - 04 - 30,000 Pounds Of
            Bananas.mp3



            Harry Chapin - Story of a Life, disc 2 - 04 - 30,000 Pounds of
            Bananas (live).mp3




            In the case above, for my needs, even the default Music folder was removed. Now, with the file structure all 4 mobile software players I have tested work.



            For my case, the Excel code looks like:



            original code:



            =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))



            my code version:



            =CONCATENATE("",TRIM(RIGHT(SUBSTITUTE(A3,"",REPT(" ",LEN(A3))),LEN(A3))))



            Of course, on the back end, you still need to copy the second Excel column and paste it into a plain text editor, to save your results. Then, you need to rename the text file from .txt to .m3u.



            Hope it works out for you.






            share|improve this answer














            I have searched and asked about this question with no good results, until I somehow reached this Superuser dot com link. Wonderful. If you're not proficient with Excel, even the above might appear daunting, or won't work for you right out of the box.



            Here are my examples of before and after, and the slightly modified excel code I used.



            My desktop media center software created an .m3u playlist. The contents of the playlist is a simple ansi text editable dataset. Note, that it includes all the desktop PC drives and sub-folders. Some of the software players I tested for my mobile devices could not handle that below file structure. That's the point of the above Excel code.




            J:NTFS_1MP3_DDan Fogelberg - River of Souls - 08 - A Love Like
            This.mp3



            J:NTFS_1MP3_HHarry Chapin - Verities & Balderdash - 04 - 30,000
            Pounds Of Bananas.mp3



            J:NTFS_1MP3_HHarry Chapin - Story of a Life, disc 2 - 04 - 30,000
            Pounds of Bananas (live).mp3




            Here below, is the output of my slightly modified version of the above Excel code:




            Dan Fogelberg - River of Souls - 08 - A Love Like This.mp3



            Harry Chapin - Verities & Balderdash - 04 - 30,000 Pounds Of
            Bananas.mp3



            Harry Chapin - Story of a Life, disc 2 - 04 - 30,000 Pounds of
            Bananas (live).mp3




            In the case above, for my needs, even the default Music folder was removed. Now, with the file structure all 4 mobile software players I have tested work.



            For my case, the Excel code looks like:



            original code:



            =CONCATENATE("..My Music",TRIM(RIGHT(SUBSTITUTE(A1,"",REPT(" ",LEN(A1))),LEN(A1))))



            my code version:



            =CONCATENATE("",TRIM(RIGHT(SUBSTITUTE(A3,"",REPT(" ",LEN(A3))),LEN(A3))))



            Of course, on the back end, you still need to copy the second Excel column and paste it into a plain text editor, to save your results. Then, you need to rename the text file from .txt to .m3u.



            Hope it works out for you.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 29 at 23:13









            Rey Juna

            5439




            5439










            answered Nov 29 at 22:49









            Yo Eleven

            1




            1












            • Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
              – Rey Juna
              Nov 29 at 23:07


















            • Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
              – Rey Juna
              Nov 29 at 23:07
















            Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
            – Rey Juna
            Nov 29 at 23:07




            Welcome to SuperUser! While your post seems pertinent to the question, not sure that it really adds to the already accepted answer which was posted almost 4 years ago. You will find that you will have a better experience if you take moment to take the Stack Overflow tour and I recommend reviewing the site guidelines on How to Ask and How to Answer. If you follow the norms of the Stack Overflow community and approach it with an attitude of helping others too, it will serve you well.
            – Rey Juna
            Nov 29 at 23:07


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f863037%2fm3u-playlist-remove-directories%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Aardman Animations

            Are they similar matrix

            “minimization” problem in Euclidean space related to orthonormal basis