View Full Version : Trim filename and path to x number chars
moley6knipe
06-28-2008, 03:21 PM
Been having some problems with dBpoweramp reference 13 ripping long filenames and paths in Apple Lossless.
Win XP Pro SP2
dBpoweramp reference 13 registered
Multi-encoding to...
Apple Lossless R8 codec
Lame 3.97 codec
For example, if my intended ripping path/filename is...
C:\Documents and Settings\Colin Wheatley\My Documents\My Music\iTunes\SqueezeCenter and AppleTV Library\iTunes Music\+DBPOWERAMP RIPS+\Rod Stewart\Reason To Believe; The Complete Mercury Studio Recordings [Disc 01]17-You're My Girl (I Don't Want To Discuss It).m4a
...then the resulting file is in a directory called...
...Reason To Believe; The Complete Mercury Studio Recordings [Disc 0\17-You're My Girl (I Don't Want To Discuss It).m4a
...and the file is invalid. Oddly the mirror directory structure of mp3s is fine...
C:\Documents and Settings\Colin Wheatley\My Documents\My Music\iTunes\iPod Library\iTunes Music\Rod Stewart\Reason to Believe; The Complete Mercury Studio Recordings [Disc 01]\17-You're My Girl (I Don't Want to Discuss It).mp3
...is a valid file. But I guess that's a marginally shorter path.
so, please can I request an option to trim filenames/paths to x number of characters, preferably with the option of where to lose the characters, ie from alubm name or filename.
Thanks!!
moley6knipe
06-28-2008, 03:41 PM
I should add that I've reorganised my ridiculous file path so I've shaved a 101 characters off the full filename and path!
So I've got a workaround, but the above took me ages to suss out what was going wrong!
Spoon
07-02-2008, 11:46 AM
I will look at it for r13.1
The best way to do this would be:
[MAXCHAR]count,string[] <<-- Not a real command, dont use
You could then specify in a nested manner how many to allow for each part
[MAXCHAR]20,[ALBUM][]
so
Reason To Believe; The Complete Mercury Studio Recordings
becomes
Reason To Believe; T
Couldn you use the SETLEN command?
[SETLEN]count,pre,post,string[]
[SETLEN]20,,,[ALBUM][]
Teknojnky
07-02-2008, 03:17 PM
the windows documents & settings folder causes alot of problems with long path/filenames.
Best to have a short \music or similar root folder to shave a ton of useless characters from the path.
yeah, you will get the best bang for your buck by changing
Documents and Settings\Colin Wheatley\My Documents\My Music\iTunes\SqueezeCenter and AppleTV Library\iTunes Music\+DBPOWERAMP RIPS+\
to
Music\
moley6knipe
07-03-2008, 08:12 AM
Yeah, thanks folks, done exactly that! I've always put music in a folder on the root before, but started ripping before I'd thought about it when I bought my latest PC!
I have indeed since discovered setlen, which works nicely (I truncate filename to 30 characters). A global setting might be nice though - perhaps something that could restrict all folders/filenames past a certain point in the folder path to x characters each, or x characters shared between the remaining filepath?
As an aside, I rip to Apple Lossless using ref 13. When I used to rip to Apple Lossless using iTunes, it would create the filenames with 36 characters being the maximum it would use.
And as a Squeezebox user, I know there's a problem with SqueezeCenter not being able to play AAC or ALAC files whose filename is above 63 characters; I think it's a limitation of QuickTime on a Windows machine, which is what SqueezeCenter calls on to transcode these formats.
Just a couple fo points in case they're of use! Cheers for the pointers folks!
Spoon
08-28-2008, 07:59 AM
It was multi encoder which needed recompiling with our latest code, now fixed:
http://forum.dbpoweramp.com/showthread.php?p=81530#post81530
moley6knipe
08-28-2008, 08:22 AM
Great, thanks! Nice work fixing the "can't type more than visible" in filepath bug, been meaning to post about that!
Hi
I just don't get this to work. I am using the default value plus the SETLEN command as described here - but whatever I do, the filename ALWAYS is extended to 180 characters! I would love to limit it, in case it should be longer, but if it's shorter, than not extend it...
Here's what I have been using:
[IFCOMP][IFVALUE]album artist,[album artist],Various Artists[]\[album][IFMULTI] Disc [disc][]\[SETLEN]180,,,[track] - [artist] - [title][][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album]\[SETLEN]180,,,[artist] - [album][IFMULTI] Disc [disc][] - [track] - [title][][]
Am I missing anything? Any error in the code? All plugins are updated to the latest version, also the multiencoder, in case it would interfere (you rewrote some code, as I read)
Thanks for helping.
Spoon
09-10-2008, 04:27 PM
Try R13.1 and use the new (not in multi encoder):
[maxlength]180,xxxxxxxxxx[]
jason_s
10-08-2008, 01:45 PM
Does the new [maxlength] option work with Arrange Audio through Batch Converter in 13.1?
Not having any luck so far...
Spoon
10-09-2008, 09:41 AM
No it would not.
Hi
After experimenting with the trial, I bought dBpoweramp (the trial absolutely convinced me!) and am currently running 13.1
Where would I set the proper command to limit my character-count to let's say 180 in the following naming-scheme:
[IFEQUALS]genre,Classical,[IFCOMP]Compilations\[album][IFVALUE]album artist,\[album artist]\,[]\[IFMULTI]Disc [disc] - [][track] - [title] ([composer] - [artist])[][IF!COMP][composer]\[album] ([year])\[IFVALUE]album artist,[album artist],[artist][]\[IFMULTI] Disc [disc] - [][track] - [title] ([album] ([composer]) - [artist])[][][IF!EQUALS]genre,Classical,[IFCOMP]Compilations\[album][IFVALUE]album artist,\[album artist]\,[]\[IFMULTI] Disc [disc] - [][track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album]\[IFMULTI] Disc [disc] - [][track] - [title]([artist] - [album])[][]
Thanks for helping!
Spoon
10-29-2008, 05:17 PM
[MAXLENGTH]180,[IFEQUALS]genre,Classical,[IFCOMP]Compilations\[album][IFVALUE]album artist,\[album artist]\,[]\[IFMULTI]Disc [disc] - [][track] - [title] ([composer] - [artist])[][IF!COMP][composer]\[album] ([year])\[IFVALUE]album artist,[album artist],[artist][]\[IFMULTI] Disc [disc] - [][track] - [title] ([album] ([composer]) - [artist])[][][IF!EQUALS]genre,Classical,[IFCOMP]Compilations\[album][IFVALUE]album artist,\[album artist]\,[]\[IFMULTI] Disc [disc] - [][track] - [artist] - [title][][IF!COMP][IFVALUE]album artist,[album artist],[artist][]\[album]\[IFMULTI] Disc [disc] - [][track] - [title]([artist] - [album])[][][]
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.