SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Rename files shorten path length not working

HI @paultaylor - I can’t seem to get the Enable Maximum File Path Length option to work on a network drive.

I’m running SK9.01 on WinServer 2016 and the network drive is a SMB host on TrueNAS (FreeBSD).
I did create support files.

As you can see here I set file path length max 50 and the album/file is much longer than that i think.

@paultaylor any updates on this one? I think I sent support files along with my other issue for duplicates that you are actively addressing.

Thanks! sorry for the bother.

Too busy today, will try and look tomorrow.

Hi Paul, following up again about this! thanks.

I have several opera albums that have very long paths and cannot be properly copied due to Windows file length limitations…

Im looking at this now…

Okay so I have tested this myself with files on a networked drive and it worked fine. Now I noticed on your screenshots that you have Limit File Path to Windows Explorer 259 Character Limit set but you also have enable Maximum File Path Length set to 50.

Now, if just trying to solve issue with long paths on Windows then you only need the first option set. For the second option this figure is the figure for the total path not just the last part so 50 is far too low, so I think what is happening is SongKong is unable to rename the file that short so doesn’t rename at all. However because of a bug in Jaikoz Drukqs 9.0 reports from the new tasks such as Rename Files are not being sent by Create Support Files so I cannot check this, but this is fixed in Jaikoz Drukqs 9.0.2.

So, please do following:

  • Upgrade to SongKong Drukqs 9.0.2
  • Uncheck Enable Maximum File Path Length and rerun Rename Files
  • If still doesnt work then run Create Support Files

Hi @paultaylor - thank you for looking into this!

I did install 9.02 and uploaded support files. Ran it numerous times with Limit File Path Length set from 240 all the way down to 125 in increments. It did not do any renaming.

Here’s an example of one of the file paths - 270 chars.

The support files are sent. do you want me to zip up some of these tracks and main folder?

I will have a look at your support files
Although it worked for me since you want this to work with Windows try mapping the path to a network drive (e.g Z:) and see if works then.

Good idea. will try this!

You have Rename files based on metadata set to No so it is not renaming at all !

We need this option rather than just renaming automatically when select task because:

  • It allows you to decide what type of files to rename
  • If set to No you can still use Move Files option to modify the base folder only.

AHA! that’s confusing. I think i read that elsewhere too. So it won’t just truncate the path starting from the back end of the file name?

what if I want to preserve the current naming structure without any masking and just truncate? is that possible?

Yes another user also didnt have this checked either.

No it will not just truncate the filename, for starters that can be a bad idea because every filename in a folder has to be unique and often the start of the filename is the same for each files in an album, and it only differs towards the end. Indeed this is the case with the mask you are using

AlbumArtistorArtist/Album/Artist - Album - Track - Title

so in this case better to truncate from the start of the filename part of the path.

In general SongKongs algorithm is more sophisticated then a simple truncate.

I would suggest that you consider changing to a shorter rename mask such as AlbumArtistorArtist/Album/Disc - Track - Title so you wont need to shorten paths so often anyway and then run with Preview Only so you can see if happy with results.

You can also modify rename mask to ensure any metadata component is no longer then certain length, e.g here we limit title to no more than first 10 characters reducing the liklihood of needing to shortern later because file path too long.

ifnotempty2(albumartist,artist,'/')
+ ifnotempty(album,'/')
+ ifnotempty(pad(discno,2),' - ')
+ ifnotempty(pad(trackno,2),' - ')
+ substring(title,10)
1 Like

@paultaylor this is great. How do i customize the mask like you showed the code for above? I can’t find where to insert that?

Existing Masks are edited in Preferences, and you can also create new ones.

Then in Rename Files you can select any of the mask to use on the Rename Files tab

1 Like