Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Creating a separate MP3 folder from a FLAC one with the same structure (Read 286 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Creating a separate MP3 folder from a FLAC one with the same structure

I have a box set which I want to convert to MP3. I don't want the MP3 files to be in the same folder as the FLAC one but I want the exact same folder structure (Box Set Folder>Disc No.>File).

I tried using the %path% command. The issue is that the output is filename.flac.mp3 instead of just filename.mp3. Is there anyway to remove the .flac? Furthermore Is there a way to output the MP3 files only up to the parent directory and not up to the C drive?

Currently the converted MP3 files are outputted as: C:\Users\Argentine\Desktop\MP3\C-\Users\Lance\Desktop\Music\Pi\Prince\Disc 001\Filename.flac.mp3

I would appreciate if I could instead it output as directly Prince\Disc 001\Filename.mp3 (none of the parental directories.)

Re: Creating a separate MP3 folder from a FLAC one with the same structure

Reply #1
Do you use a script to dictate the output when you convert?
For example, something like: "%album artist%\'['%release date%']' %album% '['%labelno%']'\%filename%"?
And if you want to create it separately, does that mean that you want it in some different library folder?

In which case you would have to move it after converting, which would require a more complicated script that I'm not sure how to modify for your situation.

Re: Creating a separate MP3 folder from a FLAC one with the same structure

Reply #2
%path% includes the full filename including extension of original file. To avoid .flac.mp3 you should use something based on %directoryname% and/or $directory_path(%path%)

To maintain part of the folder structure, I would suggest to use the $replace function, maybe with inside using the function $left(X,Y)

    $replace(A,B,C)    Replaces all occurrences of string B in string A with string C
    $left(X,Y)    Returns Y first characters of string X

If the parental directory structure is always the same, it would be something like $replace($directory_path(%path%)\%filename%,$left($directory_path(%path%),23),) can do. Adjust the number 23 to the total length of your parental directory.

If the parental directory have variable length, a lengthier name format string is needed.

So, the final name format string depends on the way you built the parental directory construction.