Results 1 to 10 of 10

Thread: CLI-FU: How do sort multiple files with the same name?

Threaded View

  1. #1
    Join Date
    Jun 2005
    Location
    Finland
    Beans
    398
    Distro
    Ubuntu

    Question CLI-FU: How do sort multiple files with the same name?

    So I've got myself a burst-camera that can shoot multiple images in just a few seconds. However the camera software is not very intuitive and stores all files in the following manner:

    DCIM/Folder001...00x/001.jpg 002.jpg and so on.

    When sorting my pictures on the computer I often use thumbnail view in my file manager, but now I have a thousand folders to go thru with names like 001 and 002 with pictures of identical names in them.

    I worked around the issue somewhat by using jhead to rename the files according to their exif dates like so:

    Code:
    find ./DCIM/ -name "*.jpg" | xargs jhead -nIMG_%Y-%m-%d_%H-%M-%S
    I then tried moving all the files to the same folder for sorting with

    Code:
    find ./DCIM/ -name "*.jpg" | xargs mv -t /path/folder
    However it turns out not all files were renamed because apparently some of them lack exif data and jhead refuses to process them.

    Now for the actual question:
    Is there a way to copy all files in a folder structure named foo.jpeg into /path/folder so that when necessary they're renamed by maybe appending a letter or a number to the end of the old filename?
    Last edited by blueturtl; August 10th, 2012 at 07:53 AM. Reason: grammar
    Eternally confused.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •