Help - Search - Members - Calendar
Full Version: Diskwriter subdirectories?
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
Plastic Snake
I've recently decided to change all of my music from mp3's to ogg's but I'm having a bit of a problem. I'd like to keep my directory more organized than: F:\My Music\ all mp3's here, and I saw the little checkbox on the diskwriter config page.

However, I'm not exactly sure how to make this work. I'd like my music to be organized like so:

F:/My Music/%artist%/%album%/ and the ogg's in there.

I've tried using the $directory thing, but I've only been able to coax an incorrect syntax out of it. Please help!
Synthetic Soul
I use:

$if2(%artist%,)\$if2(%album%,)\$if(%tracknumber%,$num(%tracknumber%,2),$num(%_diskwriter_index%,3)) - $if2(%title%,%_filename%)

... with "Create subdirectories" checked (if you don't it appears to turn the backslashes into underscores and therefore you don't get the directories).

If you used this string you would highlight all files in the playlist, select Convert > Run Conversion, and select your "F:/My Music" folder in the directory browser.

Any files without an artist or album will be placed in "F:/My Music" directly. It would be worth ensuring all files are properly tagged before starting to save any admin afterward.

Files will have path:

F:/My Music/<artist>/<album>/<tracknumber> - <title>.ogg


Edit:

If tagging is an issue, you may prefer:

$if2(%artist%,'Unknown Artist')\$if2(%album%,)\$if(%tracknumber%,$num(%tracknumber%,2),$num(%_diskwriter_index%,3)) - $if2(%title%,%_filename%)

This would place all files with no artist tag specified in a folder called "Unknown Artist". The benefit of this becomes apparent when you have an album tag, but no artist tag - otherwise you will get album folders being created in the root, mixing them with artist folders. Some of the more anally retentive around here would probably disappear up their own arseholes if that happened.
Synthetic Soul
On another note, in case you are not aware, you should read the Wiki entry below:

http://www.rarewares.org/wiki/index.php/Transcoding

This thread is midly relevant as well: (I can't find any more relevant)

http://www.hydrogenaudio.org/forums/index....=ST&f=15&t=6938


Basic upshot: transcoding's bad. It also rots your teeth and gives you brain damage.
Plastic Snake
Thanks for the info, and yeah, I just remembered about transcoding. I'd like to switch to ogg for higher quality, but I'd have to re-rip all those cd's, and that'd be a pain in the butt. Thanks anyway though!
boombass
@Synthetic Soul:
I just tried using your string (the first one) and it was exactly what I was looking for. But there is one thing I'd like to change, and I hope you can help.

Some of my songs have a dash in the title, and your string seems to convert the dash to an underscore. For example:

06 - The Dream Of The Blue Turtles - Demolition Man.flac
... becomes
06 - The Dream Of The Blue Turtles _ Demolition Man.ogg

(I had to use a dash because the actual song has a slash [/] which is verboten in Windows filenames.)

Can you show me how to get my dashes back? Thanks!

(Also, is there any good info around about diskwriter commands?)
boombass
I think I figured it out! This string works for me:

$if2(%artist%,)\$if2(%date%,) - $if2(%album%,)\%_filename%

It organizes my music the same way I organized as I was ripping it. Synthetic Soul's version is nice too, if the songs in question are not already organized.
Synthetic Soul
I think the reason underscores were being introduced was probably as my string was using the TITLE tag, which would still have the "/", unlike your FLAC filename. Foobar/diskwriter was replacing this illegal character with an underscore.

As your original filename is already formatted as you require your string is a simple workaround.

If you didn't have this luxury, and did not want to use underscore as the replacement character, you would have to replace all illegal characters manually, as you saw fit, using the $replace() function.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.