How to rename batches of pictures in Konqueror?

Does anyone have a good tip for how to rename batches of pictures easily in Konqueror?

I’ve installed KRename, but it’s pretty cumbersome to have to chose “Action > Rename using KRename” with every batch (and then having to wait until the application is started, etc.) And Konqueror unfortunately doesn’t support renaming of multiple files. (I’m aware that Dolphin does, but since I’m mostly using Konqueror I’d like to stick to one application).

Best,

homoludens

Tried Gwenview ? it supports batch renaming

Andy

Thanks for the tip. Yeah, Gwenview is pretty useful. It’s too bad that the plugin ‘batch rename’ doesn’t allow more detailed customization, though (I would like to rename files with numbers in brackets, like so: “picture (1).jpg”, in line with Windows’ renaming scheme … ) Oh, well, not that important … :wink:

Cheers,

homoludens

On Monday 15 December 2008 03:26, homoludens1000 wrote:

> Thanks for the tip. Yeah, Gwenview is pretty useful. It’s too bad that
> the plugin ‘batch rename’ doesn’t allow more detailed customization,
> though (I would like to rename files with numbers in brackets, like so:
> “picture (1).jpg”, in line with Windows’ renaming scheme … ) Oh, well,
> not that important … :wink:

What is Windows’s renaming scheme?
Perhaps there is another tool, but please give soem more details or
examples.


There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams

Batch renaming under Windows is simple but does the job in my opinion. You can mark several files, chose rename, and then they are renamed subsequently to <new-name (#).typ> (where # is a number that starts from the value you have chosen and increase by +1 per file, and .typ is the file type).

Gwenview’s batch rename unfortuntely doesn’t allow formating the number. KRename does, but it’s cumbersome to have to restart it with every renaming job.

Cheers,

homoludens

I wrestled with this problem recently. Finally realized that file renaming was best done in bash, not via the GUI. Also, picture preprocessing was best done in bash, not in one of the picture editors. Code:


#!/bin/bash
## D90 image sizes: 4288x2848, 3216x2136, 2144x1424. Resize to 1072x712.
SUBDIR="display"

## Subdirectory exists? If not, create it.

    if  ! -d ./$SUBDIR ]; then mkdir ./$SUBDIR; fi

    shopt -s nocaseglob    # Case-insensitive matching
    for f in *.jpg
        do
        convert -unsharp 0x.6  -resize 1072x712  $f ./$SUBDIR/$f
        done

## Go to subdirectory. Change the file names, add suffix "a".
    cd ./$SUBDIR
    for file in *.jpg
        do
        mv "$file" "${file%.jpg}"a.jpg
        done

echo "Done ..."

HTH

tcubed_bus, thanks a lot for the code, I might make use of it.

But isn’t using bash a bit cumbersome, given that you don’t know exactly what is in the pictures you are displaying? It seems to be that your way works well for small batches, but say you want to download your most recent 200 pictures from your digicam, browse through them and rename them according to, for example, the place you took the pictures, you would have to switch back and forth between Dolphin/Konqueror/Gwenview and CLI. Plus, you would have to remember the names of the files to rename …

Cheers,

homoludens

homoludens:
Of course, a bash script can do only a textual renaming, such as appending a fixed string or something like a date_time_count string to a filename. Only you would know to alter the name to “Ted_and_Susie_June_2009_eiffel_tower.jpg”, or some such, more meaningful, title.

I would argue, though, that the batch rename, resize, and sharpen script I offered has a great real-world utility, precisely in those cases where you find yourself faced with the task of editing the day’s shoot of 500 images. For one thing, just transferring such a load into an editing program takes a lot of time. An automated way of sticking the files into a regular directory can ease the first-order culling task, after which you can fire up the photo edit application and polish up the keepers.

As for the meaningful names, this is a classic problem, one that is addressed by the “photo album” applications, and their tagging mechanism. In such a practice, you retain the dsc_1234.jpg filename, and add tags like “Ted”, “Susie”, “Honeymoon”, “Paris”, etc., to distinguish the files. It’s not a perfect mechanism, but it is far less cumbersome than the runon renaming syndrome that one can find one’s picture directories suffering from otherwise. SuSE’s digikam is a good example of a photo album app, that has a decent tagging capability. Like a lot of such apps, though, digikam forces you to import all your pics into its “album” structure, even though it looks an awful lot like a plain old directory copy.
Photo postprocessing workflow is a fascinating topic, but a little far afield from the original one of batch file renaming.
HTH

> Dolphin/Konqueror/Gwenview and CLI. Plus, you would have to remember the
> names of the files to rename …

I think you need to introduce yourself to digiKam, it is in the SUSE
repositories and it will help you download (from the camera) and manage all your
photos. Including, if you click on Batch > Rename Images you get a window where
you can set prefix string, number start value, and add the original file name
and date (or not).

Have a look, it is pretty slick and I think can do almost all (if not all)
that Windows (or Dolphin/Konqueror/Gwenview and CLI) can, in one tidy package.

And, the price is RIGHT!

Hi,

instead of a bash script you can also use krename to rename all you photos/files. It also offers the possibility to execute commands on the files for example you can use ImageMagick to apply some changes to you photos.

Hope this helps

All,

thanks for your help and advice. I’ll take a look at digiKam.

tcubed_bus, yes, you’re right, there is a much more fundamental problem involved regarding how to post-process photos. Retaining the original file name and tagging files instead certainly is a smart solution. However, I’m a bit reluctant to use a solution that makes me dependent on one particular program.

Anyway, I’ve learned a lot, thanks!

homoludens

On Tuesday 16 December 2008 05:46, homoludens1000 wrote:

> But isn’t using bash a bit cumbersome, given that you don’t know
> exactly what is in the pictures you are displaying? It seems to be that
> your way works well for small batches, but say you want to download your
> most recent 200 pictures from your digicam, browse through them and
> rename them according to, for example, the place you took the pictures,
> you would have to switch back and forth between
> Dolphin/Konqueror/Gwenview and CLI. Plus, you would have to remember the
> names of the files to rename …

Yes, but to solve that problem, a rename tool isn’t very usefull. Besides,
on most cams, the picture allready have sequential names, so related
picture follow each other.

If you use something that will read the Exif data from each picture, and
extract the date/time to rename the file accordingly? A format like
YYYMMYY_hhmmss.jpg brings related picture together nicely. Especially
usefull if you bring pictures from several cams together.

Oh, and you need some tool to detect duplicates, too…


There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams

Not really related any more to the title of the post, sorry … :

The fundamental problem really is how to treat / store picture files. The smartest solution probably is to use some sort of picture album software like digiKam where one would leave files name as they are and categorize files through tags.

Perhaps I’m too much stuck with an old way of thinking about files, but I have a hard time getting used to the thought of having essentially one huge folder with thousands of pictures whose names don’t tell me anything unless I use a particular program (and where a program error / bug etc might, for instance, render all previously entered tags useless). So I’m using a hierarchical folder/file name = scene + date structure.

I should probably read up on the issue a bit and/or starting a post on this topic. Actually very intriguing.

> unless I use a particular program (and where a program error /
> bug etc might, for instance, render all previously entered tags
> useless)

there are standardized ways to enter data into the pix file
itself…read about Exchangeable Image File Format http://www.exif.org

On Friday 19 December 2008 04:06, homoludens1000 wrote:

> The fundamental problem really is how to treat / store picture files.
> The smartest solution probably is to use some sort of picture album
> software like digiKam where one would leave files name as they are and
> categorize files through tags.

I don’t like those programs. Too many conditions must be met before they
work, too much investment in defining tags, too difficult to move between
systems, too messy to have a decent backup of.
And that even goes for the most reputable (Picaso, for instance)

> Perhaps I’m too much stuck with an old way of thinking about files, but
> I have a hard time getting used to the thought of having essentially one
> huge folder with thousands of pictures whose names don’t tell me
> anything unless I use a particular program (and where a program error /
> bug etc might, for instance, render all previously entered tags
> useless). So I’m using a hierarchical folder/file name = scene + date
> structure.

I completely understand your point of view, and share it. People seem to
forget that there is a completely stable, lightweight and portable way of
identifying subjects and assigning files to them: directories.

I have a friend who’s a pro photographer. She’s very good at what she
does, but thought it was a good idea to store her 80.000+ images in a
Picasa database. One crash and recovery later, we agreed on a structure
of project directories with a reference to the client’s name and date.

> I should probably read up on the issue a bit and/or starting a post on
> this topic. Actually very intriguing.

For my own pictures (mostly family and friends), I have a common archive
to store the originals. Any other work goes elsewhereand is allways based
on a copy. But nothing is touched in the originals.

The archive has a common dir, then the year in the seconf level, and the
full date+description in the third level. Works just fine for me.
For a series of pictures taken over several days (vacation), a date range
can be used.


There is an art, it says, or rather, a knack to flying.
The knack lies in learning how to throw yourself at the ground and miss.
Douglas Adams

Rikishi42:

Your system is, I think, very similar to mine (although I don’t create extra copies), and so far it has worked well for me. And I couldn’t agree more, if there is a simple and universal way to do things (like using directories and file names), I don’t see the necessity for something more complicated and potentially less reliable. (Similarly, I switched, for example, from using task managers to simply storing my to-do lists in a .cvs file. Works well and on every computer I have access to …)

But we’re getting off track. I should probably declare this topic closed.

Cheers everyone for your posts! :slight_smile:

homoludens