how create new folder from playlist?

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Dan-cer
Level 6
Level 6
Posts: 1091
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

how create new folder from playlist?

Post by Dan-cer »

I've 22 playlists and a very large music library. For my car I want to have only the tracks on a stick that are in the playlists.
My idea: Create 22 new folders with these tracks.

Is there an easy way to do this in a bulk action?
Last edited by LockBot on Sat Dec 02, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
How you get better results when searching for yourself.
Mike_robbin
Level 1
Level 1
Posts: 2
Joined: Fri Jun 02, 2023 7:39 am

Re: how create new folder from playlist?

Post by Mike_robbin »

What application you use?
Dan-cer
Level 6
Level 6
Posts: 1091
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: how create new folder from playlist?

Post by Dan-cer »

In Linux Mint I use Lollypop. In Windows MediaMonkey.
MediaMonkey is the most feature-rich app I know, and it might work with it somehow.
However, it also could be done with a certain command or command chain. That's why I posted it here.
How you get better results when searching for yourself.
Dan-cer
Level 6
Level 6
Posts: 1091
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: how create new folder from playlist?

Post by Dan-cer »

Update:
I got a solution from a MediaMonkey programmer now. That is by using the feature "Auto-Organize" that is part of MediaMonkey. I just have to set a few parameters.
The action was successful and spared me a lot of time.
How you get better results when searching for yourself.
linuxpinux
Level 1
Level 1
Posts: 11
Joined: Sat May 27, 2023 3:26 pm

Re: how create new folder from playlist?

Post by linuxpinux »

use the command line: open a terminal => Navigate to the directory where your music library is located. For example, if your music is stored in the '/home/your-username/Music' directory, you can use the following command to navigate to that directory: cd ~/Music => Create the 22 folders for your playlists. You can use a loop to automate this process. Assuming your playlists are named "Playlist1" to "Playlist22," you can run the following command: for i in {1..22}; do mkdir "Playlist$i"; done,this command will create folders named "Playlist1" to "Playlist22" in your current directory. => Now, you'll need to copy the tracks from your playlists to their respective folders. You'll need to know the paths to your playlist files for this step. Assuming your playlist files are in the '/home/your-username/Playlists' directory, you can modify and run the following command for each playlist: cp --parents "$(cat /home/your-username/Playlists/PlaylistX.m3u)" /home/your-username/Music/PlaylistX Replace X in PlaylistX.m3u and /home/your-username/Playlists/PlaylistX with the appropriate playlist number and path. This command uses the cp command with the --parents option to copy the files from the playlist while preserving their directory structure. It reads the paths of the files from the playlist file and copies them to the respective playlist folder. Repeat this command for each of your 22 playlists, replacing X with the appropriate playlist number.
Once you've completed these steps, you should have 22 folders in your Music directory, each containing the tracks from the corresponding playlist. You can then copy these folders to your USB stick for use in your car.
Dan-cer
Level 6
Level 6
Posts: 1091
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: how create new folder from playlist?

Post by Dan-cer »

Thank you @linuxpinux for this nice approach. I understand that it will do the job too. And for any user visiting this topic it could be the solution when MediaMonkey (that unfortunately runs only on Windows so far) isn't in play.
I would have followed your fine step by step instruction for sure. However, I got already the MediaMonkey version as I wrote above.
How you get better results when searching for yourself.
Locked

Return to “Other topics”