Batch rename updates

Hey everyone, in these past weeks I’ve been working on implementing Allan’s design and now I’m getting closer and closer to having the work completed.

This is how the batch rename dialog looks like now:


The format mode consists of an entry where you can add several tags, like the original file name or numbering. For files with metadata, the user also has the option to add relevant information, like the creation date for photos or the artist of the song for music. The metadata is acquired using a tracker query, then stored and used when needed. Apart from this, there can be written text anywhere between the tags. So, now, for a photo, instead of having a default meaningless name, we could have something like this:

photo 2

If there is added numbering, there is also the option to sort the files based on some criteria.  The Add button pops up a menu with the tags that are currently available. Here is how the menus look like:

Photo 4                                     Photo 3

Keeping the arrows and labels in the listbox the way we wanted proved to be a little more difficult than we expected. The obvious solution was to use GtkSizeGroup to make the labels have the same width, but this proved to be a bad idea due to the big complexity of the GtkSizeGroup, making the dialog completely unusable when renaming a few thousand files. The workaround we used was to have three listboxes instead of one and add both the listboxes that hold the name labels in a GtkSizeGroup. This way, it looks nice and it also takes a decent amount of time.

The replace mode works the same way as it did before, having suffered only a few design changes, like the entries not being on the same row and adding highlight to the replaced text.

Screenshot from 2016-08-04 22-43-37

Conflicts are also handled in a different way now. When a conflict occurs a label with two buttons pops up, so the user will be able to navigate through all the conflicts. When the arrows are clicked, the next/previous row with a conflict is selected in the listbox.

Photo 5

Also, I will be coming to GUADEC, so see you there! 🙂


Batch rename updates

5 thoughts on “Batch rename updates

  1. ElectricPrism says:

    This looks amazing, I have about 3,000 scans I will be batch renaming soon, I will probably hack together a script – I often name design documents, and other revisions based on timestamp so it’s nice to see that in there.

    Off topic I wish I automatically have files rename when merging two folders – eg:

    If 2 files size matches, overwrite, otherwise rename to otherfile-2.odt.

    I recently merged maybe 50,000 backup files and getting partial backups back into a unified tree was more important than the exact version.

    Anyways, I really like to format my timestamps say


    It would be desirable if I had some control over the formatting of the timestamp. It’s difficult to just tell my 9 other Linux Users I help that 201608111230 is a date, it might not occur to them the same as 2016-08-11-12-30 or even myfile_2016-08-11_12-30

    Food for thought, great work 🙂


    1. Hey, thanks!

      I’m not sure how merging of two folders should be handled, though for 50000 files some automation would definitely be useful.

      I think that you’re right about being able to control the format of the date. I’ll think of how this can be integrated 🙂


  2. The work is just amazing, I’m really looking forward using it 🙂

    Two things though :
    1) In “Format” mode the tags should be highlighted to appear as “tags” to the user and not as raw text. Something similar to
    2) In “Find and replace” mode some common find target should be accessible via tags/add button (similar to format mode). For example: [spaces] that match any space caracter, [date] that fuzzy match any date format (this one may be difficult), [space placeholder] that match -, _ or any space character, [number…] that match number at the beginning of a file name, […number] that match number at the end of a file name (but before extension if any)… and so on. This would allow basic replacement strategies with an UI similar to “format mode” (no new UI to learn) and without requiring to use regex.

    Reading ElectricPrism comment, I think my second proposition could be one possible way to start to take care of the “date formating” problem… maybe.

    Whatever continue the good work 😉


    1. Thanks!

      The initial design had that kind of tags, but for that to really be useful it also had to support drag and drop. Because of my deadline I decided to go with raw text for now and maybe do that after my project ends.

      The tags for replace would make sense for numbers and date, but not sure if for spaces and – or _ since you can already do that quite easily. I’ll ask my mentor what he thinks about this


      1. pymaldebaran says:

        Nice to hear that the tag design was in the original design !

        My GF mention another usefull “find and replace” tag (I feel stupid to to have thought about this one…) : “uppercase letters” and of course it’s opposite “lowercase letters”…

        I hope you’ll have some time to do all the polish you want on the app, you did such a good job so far !


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s