Rename to exif date: Unique filenames without creating duplicate files

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I recently posted a question about how to rename image filenames in a stable way to the exif date:



Exiv2 rename: Make unique filenames



This is a follow up question to it:



How can I additionally to the requirements in my first post make sure that no duplicate files are created. Consider for example three files fileA.jpg, fileB.jpg, fileC.jpg.



Suppose that fileA.jpg and fileB.jpg have the same exif time, say 2017:09:30 20:12:31 but are different images, i.e. not bitwise identical files. fileC.jpg however is the same as fileA.jpg.



Now if I apply the renaming command to the directory containing those files, I want to get:




  • 2017_09_30__20_12_31.jpg (from fileA.jpg)


  • 2017_09_30__20_12_31-1.jpg (from fileB.jpg)

And fileC.jpg should be deleted, since it is bitwise the same as fileA.jpg.










share|improve this question

























    up vote
    0
    down vote

    favorite












    I recently posted a question about how to rename image filenames in a stable way to the exif date:



    Exiv2 rename: Make unique filenames



    This is a follow up question to it:



    How can I additionally to the requirements in my first post make sure that no duplicate files are created. Consider for example three files fileA.jpg, fileB.jpg, fileC.jpg.



    Suppose that fileA.jpg and fileB.jpg have the same exif time, say 2017:09:30 20:12:31 but are different images, i.e. not bitwise identical files. fileC.jpg however is the same as fileA.jpg.



    Now if I apply the renaming command to the directory containing those files, I want to get:




    • 2017_09_30__20_12_31.jpg (from fileA.jpg)


    • 2017_09_30__20_12_31-1.jpg (from fileB.jpg)

    And fileC.jpg should be deleted, since it is bitwise the same as fileA.jpg.










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I recently posted a question about how to rename image filenames in a stable way to the exif date:



      Exiv2 rename: Make unique filenames



      This is a follow up question to it:



      How can I additionally to the requirements in my first post make sure that no duplicate files are created. Consider for example three files fileA.jpg, fileB.jpg, fileC.jpg.



      Suppose that fileA.jpg and fileB.jpg have the same exif time, say 2017:09:30 20:12:31 but are different images, i.e. not bitwise identical files. fileC.jpg however is the same as fileA.jpg.



      Now if I apply the renaming command to the directory containing those files, I want to get:




      • 2017_09_30__20_12_31.jpg (from fileA.jpg)


      • 2017_09_30__20_12_31-1.jpg (from fileB.jpg)

      And fileC.jpg should be deleted, since it is bitwise the same as fileA.jpg.










      share|improve this question













      I recently posted a question about how to rename image filenames in a stable way to the exif date:



      Exiv2 rename: Make unique filenames



      This is a follow up question to it:



      How can I additionally to the requirements in my first post make sure that no duplicate files are created. Consider for example three files fileA.jpg, fileB.jpg, fileC.jpg.



      Suppose that fileA.jpg and fileB.jpg have the same exif time, say 2017:09:30 20:12:31 but are different images, i.e. not bitwise identical files. fileC.jpg however is the same as fileA.jpg.



      Now if I apply the renaming command to the directory containing those files, I want to get:




      • 2017_09_30__20_12_31.jpg (from fileA.jpg)


      • 2017_09_30__20_12_31-1.jpg (from fileB.jpg)

      And fileC.jpg should be deleted, since it is bitwise the same as fileA.jpg.







      command-line exif






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 2 '17 at 6:08









      student

      6,6381663112




      6,6381663112




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Do it in two jobs:



          • Delete duplicates

          • Rename files

          An easy way to remove duplicates is by installing fdupes first and run it in current directory:



          fdupes ./ --delete --noprompt


          The first time you might want to run it without --noprompt.



          (In the link to Exiv2 rename: Make unique filenames you did not flagged the answer which solved your problem. Pls do.)






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395569%2frename-to-exif-date-unique-filenames-without-creating-duplicate-files%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Do it in two jobs:



            • Delete duplicates

            • Rename files

            An easy way to remove duplicates is by installing fdupes first and run it in current directory:



            fdupes ./ --delete --noprompt


            The first time you might want to run it without --noprompt.



            (In the link to Exiv2 rename: Make unique filenames you did not flagged the answer which solved your problem. Pls do.)






            share|improve this answer
























              up vote
              0
              down vote













              Do it in two jobs:



              • Delete duplicates

              • Rename files

              An easy way to remove duplicates is by installing fdupes first and run it in current directory:



              fdupes ./ --delete --noprompt


              The first time you might want to run it without --noprompt.



              (In the link to Exiv2 rename: Make unique filenames you did not flagged the answer which solved your problem. Pls do.)






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                Do it in two jobs:



                • Delete duplicates

                • Rename files

                An easy way to remove duplicates is by installing fdupes first and run it in current directory:



                fdupes ./ --delete --noprompt


                The first time you might want to run it without --noprompt.



                (In the link to Exiv2 rename: Make unique filenames you did not flagged the answer which solved your problem. Pls do.)






                share|improve this answer












                Do it in two jobs:



                • Delete duplicates

                • Rename files

                An easy way to remove duplicates is by installing fdupes first and run it in current directory:



                fdupes ./ --delete --noprompt


                The first time you might want to run it without --noprompt.



                (In the link to Exiv2 rename: Make unique filenames you did not flagged the answer which solved your problem. Pls do.)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 2 '17 at 7:12









                hschou

                1,66349




                1,66349



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395569%2frename-to-exif-date-unique-filenames-without-creating-duplicate-files%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?