Welcome Guest

Pages: 1 2
Renaming Artwork/Non-media Files
lvsassPostJanuary 21, 2024, 07:41
Newbie
Posts: 4
Registered:
August 9, 2021, 11:13
Normal topicRenaming Artwork/Non-media Files

I have an action that saves all the art work to the music file's folder.

At the moment it is set to save the artwork to ./, with the filename cover, appending an artwork item index. This results in files named cover - 1.jpg, for example. In order for my media player to pick up all the artwork, it should be named cover-1.jpg, i.e. without spaces.

Is there away to define the formatting of the index, maybe with escape sequences?
Or is there an action that can perform renaming on non-media files, with regular expressions or similar?

2MR2PostJanuary 21, 2024, 10:11
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicRenaming Artwork/Non-media Files

The Move Non Audio Files statement can rename files. I've uploaded a sample action to:

https://2manyrobots.com/actions/Recursively-remove-spaces-from-jpg-filenames.zip

The action is named Recursively remove spaces from jpg filenames

The action will prompt for a 'root' path which will be recursively deep processed. All jpg files containing spaces in their filenames will be renamed.

Note that any file which has a leading or trailing space in its filename will not be renamed. This is a bug and will be fixed in the next patch/release.

2MR2PostJanuary 21, 2024, 10:21
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicRenaming Artwork/Non-media Files

I'll also add an option to the Artwork to Folder statement to suppress the spaces when appending stuff.

lvsassPostJanuary 21, 2024, 11:24
Newbie
Posts: 4
Registered:
August 9, 2021, 11:13
Normal topicRenaming Artwork/Non-media Files

Great, thanks so much!

2MR2PostJanuary 21, 2024, 16:59
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicRenaming Artwork/Non-media Files

It seems as if the Copy/Delete/Move Non Audio Files statements are documented as ignoring leading and trailing spaces in an inclusion/exclusion list. This is limiting but has to be preserved. For that reason, in the next release, the three statements all have a new option named Trim. Trim will be enabled for all pre-existing statements and will initially be off for newly created ones. When released, if you want the supplied action to handle leading and trailing spaces, you'll have to edit the last line to uncheck the new Trim setting.

In the next release, the Artwork to Folder statement has a field where you can specify the delimiter. If the field is empty the previous delimiter of {space}-{space} will be used.

This release will be going to the preview list the first week of March, or possibly earlier. If you want an early peak, send an email to support@2manyrobots.com saying you want on the list and I'll add you.

bigshumPostSeptember 12, 2024, 05:11
Newbie
Posts: 7
Registered:
July 23, 2015, 17:41
Normal topicRenaming Artwork/Non-media Files

Is there a zero padding option anywhere within Yate?

2MR2PostSeptember 12, 2024, 07:19
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicRenaming Artwork/Non-media Files

I assume that you're referring to free space in the audio files.

A normal Save in the UI is controlled by two settings in Settings - Audio - Common: Remove free space and Padding. The Save action statement can force the removal and you can override Padding via the Modify Application Settings statement.

You can also do a File>Save Selected Files>Save Always Freeing Space.

bigshumPostSeptember 12, 2024, 07:25
Newbie
Posts: 7
Registered:
July 23, 2015, 17:41
Normal topicRenaming Artwork/Non-media Files

Apologies for not being clear. My query was about zero indexing of the index string within this function.

Currently I will end up with a list of artwork files;

artwork-1.jpg
artwork-2.jpg
...
artwork-11.jpg

Whereas for my purposes I have to run an external script after the fact to change these to;

artwork-01.jpg
artwork-02.jpg
...
artwork-11.jpg
2MR2PostSeptember 12, 2024, 08:05
Avatar photo
Administrator
Posts: 2152
Registered:
August 23, 2012, 19:27
Normal topicRenaming Artwork/Non-media Files

My bad. Are you using Artwork to Folder? If so, I'd have to add a pad option ... somewhere 🙂

bigshumPostSeptember 12, 2024, 08:21
Newbie
Posts: 7
Registered:
July 23, 2015, 17:41
Normal topicRenaming Artwork/Non-media Files

That's correct I'm using 'Artwork to Folder'.

If it makes it into a future release - awesome!

If not - no worries!

Pages: 1 2
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.043 seconds.