18 Replies Latest reply on Aug 14, 2015 2:03 AM by AylwinC

    Automatically delete original RAW files while converting to DNG?

    basu68

      I am looking for a way to be able to convert a complete disk with RAW files to DNG for backup purposes.

      Adobe's DNG converter does that for me but I am missing a "Delete original RAW files"button in de GUI or a parameter in the command line options.

      Apart from deleting the RAW's manually which could be a lot of work when working with a terabyte of images, located in many different folders on the disk, there is no space for both the DNG and RAW files on the same disk so automatically deleting the RAW's as soon as they are converted would be quite useful.

       

      I am quite suprised Adobe did not put this option in already but until they do, does anyone have a trick to accomplish this with the options available?

      There must be a solution in scripting, but since that isn't my thing any help would be very welcome!

        • 1. Re: Automatically delete original RAW files while converting to DNG?
          JimHess-OxQsWQ Level 2

          Just an observation.  Are you sure you want to delete the original raw images?  Yes, I realize that there are many proponents to converting everything to DNG.  But usually software provided by the manufacturer does not support DNG.  So if the occasion ever arose where you wanted to use that software, for whatever reason, you would not be able to do so.  Personally, I think it is a better choice to get some additional hard disk space and archive the raw files.  But that is my workflow choice.  I see little value in converting to DNG.  My NEF files are not significantly smaller when converted.  And I don't find the "open format" that DNG files are touted to be as any real advantage.  Until I am convinced otherwise, I just work with my original raw files.

          • 2. Re: Automatically delete original RAW files while converting to DNG?
            basu68 Level 1

            Jim, I appreciate your concern.

            I have decided to make my backups in DNG for several reasons: Personally I have never used the software that came with the camera, and theAdobe programs I do work with, all support DNG. The filesize will be smaller (sometimes even up to 20%) but more important, the sidecar file with my editing info and settings gets baked into the DNG file.

            Because I make my living with my photos, backing them up once will not be 100% safe so I keep the original RAW files at my own place so I can easily access them and put a backup of DNG's at a different address in case of theft/fire or harddrive failure.

            Pretty safe in almost all possible scenarios I guess!

            • 3. Re: Automatically delete original RAW files while converting to DNG?
              JimHess-OxQsWQ Level 2

              I don't know if this will help you.  But under the Library menu there is an option to convert file to DNG.  When you click on that, there are a couple of options, one of which is to get rid of the original raw file.  You could go to your entire catalog and highlight all images and do a conversion that way.  Just a suggestion.  I've tried it on a few images just moments ago and it works very smoothly.

              • 4. Re: Automatically delete original RAW files while converting to DNG?
                basu68 Level 1

                The problem with this solution is that I do loose my original RAW's that way and the files on the backup disk are not in the library.

                It would be possible to import all the files on the backup disk into a new library but a "delete original file after succesful conversion" should not be in the converter if you ask me or at least as a parameter in the command line options.

                If Adobe wants to make DNG a success they might put some more effort in this tool...

                • 5. Re: Automatically delete original RAW files while converting to DNG?
                  JimHess-OxQsWQ Level 2

                  Then I guess I still don't fully understand your workflow.  What I would suggest doing is storing your original raw files at the other address, and then you could use my suggestion on the files where you are doing your work.  I'm rethinking my attitude toward DNG files.  I watched a video today by Julienne Kost, an Adobe expert, who indicated that DNG files have a greater probability of being usable in the future then do the original raw files.  This is because of the open and documented format that DNG is.  She said that her workflow is to download the original raw files from her camera.  Then she goes through them and rates them and deletes the bad ones and does her editing, still on the original raw files.  Then she uses the option I mentioned to eventually convert the keepers and she says she deletes the original raw files from her working folder.  But she stresses the importance of having a backup of the original raw files "just in case".  If you did that, but had copies of the originals at the other address, that might be a solution.

                  • 6. Re: Automatically delete original RAW files while converting to DNG?
                    basu68 Level 1

                    so that is more or less what I am trying to achieve, still stuck with my original problem!

                    • 7. Re: Automatically delete original RAW files while converting to DNG?
                      JimHess-ra2Osl Level 3

                      Then what is it that I don't understand?  You say you want to convert to DNG and get rid of the original raw files.  That option in the library module that I spoke of does exactly that.  Why won't that work?  In your previous answer you indicated that it wouldn't work because you lose your original raw files.  Isn't that what you are trying to do?  If you have the raw files stored in a secondary location they will not be deleted because they are not part of the Lightroom catalog.  I'm still confused a little.  What do you REALLY want to do?

                      • 8. Re: Automatically delete original RAW files while converting to DNG?
                        basu68 Level 1

                        I want to keep my original files in RAW, at my workplace. At the same time I want to backup those files as DNG and store them somewhere else.

                        Since this whole thing takes days for a 1 or 2TB disk, I would like the process to be as automated as possible.

                        I would like to keep my original folder structure, which can sometimes be quite intricate.

                        We are talking more then one hundred thousand files per disk here, a workaround through Lightroom seems overly complicated and error-prone.

                        If for some reason the process stops it would be very hard to restart the whole thing on the right spot.

                        For converting, I do not want to rely on Libraries, especially not because some images are not in a Lightroom Library at all or when I am using multiple libraries.

                        A simple button "remove original RAW files" in Adobe's DNG converter seems like a sensible solution, and pretty much a must if Adobe really wants to push this format. Judging by the very low speed by which the converter seems to be updated since the introduction of this format and the limited discussions about it in this forum, I am afraid Adobe has a long way to go...

                        • 9. Re: Automatically delete original RAW files while converting to DNG?
                          Nikolaj1972

                          I too are looking for a dng-converter that does more than the small converter that adobe makes. If i use Lightroom to convert and delete the source file it takes forever because lightroom is sooooo slow at converting and importing.. Come on adobe make some good converting software..

                           

                          /Nik..

                          • 10. Re: Automatically delete original RAW files while converting to DNG?
                            JimHess Adobe Community Professional & MVP

                            This is certainly an old thread! Have you tried converting to DNG when importing from your camera, and at the same time saving a copy to a different location? That second copy will be in the original raw format, not DNG. The DNG files would then be in the catalog but the original raw files would not. They would simply be stored as a backup to wherever you choose to have that second copy created.

                            • 11. Re: Automatically delete original RAW files while converting to DNG?
                              Nikolaj1972 Level 1

                              Jim

                               

                              I know the thread is old but i found it on top of a google search.

                               

                              The problem is not really when i import photos to lightroom from cam.

                              The problem is i have a full HDD with no space left so i want to convert all the NEF files to DNG.

                               

                              When i used library-convert to dng then it stopped in the middle of everything and told me i dident have enough storage space, but i thought that by deleting the old NEF files while converting to DNG the space wouldent matter.

                               

                              And i have tried Import-copy as dng (convert as dng) and that doesnt work either witout enough storage space. And BTW isnt the words Copy and Convert contradictory ?

                               

                              Im not a nitpicker i just havent found the right tool for this job.

                              And yes i know if i go and buy a new hdd and convert all to that one and then delete all the old NEF files from the old hdd problem would be solved but not really cuz there is still a lot of files that lightroom cant read, atleast that what lightroom tells me everytime i make a new catalog.

                               

                              All in all it seems that when lightroom does something then it doesnt do it 100% well and then you sit with 500.000 pictures you have to figure out which ones is processed and which ones is not so instead of having a piece of software that should make things easier you have to do things manually anyway. Thats just my generally opinion.

                               

                              /Nik.

                              • 12. Re: Automatically delete original RAW files while converting to DNG?
                                areohbee Level 6

                                Deleted raws go to recycle bin, so you have to empty your recycle bin to recover storage.

                                • 13. Re: Automatically delete original RAW files while converting to DNG?
                                  Kitlard

                                  I just registered to say I really want this too.

                                  It just sounds like such a small change and it will be very useful (for some of us)

                                  • 14. Re: Automatically delete original RAW files while converting to DNG?
                                    AylwinC

                                    I realize that this is an old thread but I was searching for the same thing and this was the top result on Google.  So I guess others might end up here as well.

                                     

                                    It would be nice if Adobe would implement this feature in the Digital Negative Converter.  Lightroom already has it as a checkbox.  I don't see why they couldn't implement it to DNC also.

                                     

                                    Anyway, it's not too difficult to delete the files manually.  On my Mac terminal, I simply run the command:

                                    $ find /Volume/Photos/Archive/2010 -name "*.CR?" -type f -delete

                                     

                                    The above command will find all Canon RAW files (.CRW and .CR2) under the defined path and delete them.  If you want to be careful, you can make sure you have the same number of .dng files before deleting the raw files:

                                    $ find . -name "*.dng" -type f | wc -l

                                        2290

                                    $ find . -name "*.CR?" -type f | wc -l

                                        2290

                                    $ find . -name "*.CR?" -type f -delete

                                     

                                    Hopefully, this helps.

                                    • 15. Re: Automatically delete original RAW files while converting to DNG?
                                      JimHess Adobe Community Professional & MVP

                                      I still don't think you really want the DNG converter to automatically delete the original raw files. What if (and it's possible) one or more of the files being converted doesn't convert exactly right? You have had the DNG converter automatically delete the original file and you've got nothing to turn to. On the other hand, if the DNG converter does its job and everything converts as it should,, all that's necessary is to insert the card back in the camera and run a format and the raw files are gone. It really is a safety net, in my opinion, to NOT have the original raw files deleted automatically.

                                      • 16. Re: Automatically delete original RAW files while converting to DNG?
                                        AylwinC Level 1

                                        Very good point!  It's probably best to first make sure that all those DNGs are properly imported into Lightroom before deleting the RAW originals.  In any case, it's still a simple terminal command to delete all those RAW files once I'm sure I really want them gone.  At least that's applicable in my case where I'm converting old RAW files stored on my hard disk.  And since the RAW files on the memory cards are long gone, it makes it even more important to first check that all the DNG files are good.

                                        • 17. Re: Automatically delete original RAW files while converting to DNG?
                                          JimHess Adobe Community Professional & MVP

                                          I know this isn't going to solve your problem. However, just for your information, when you choose to convert raw files to DNG using Lightroom and these raw files are already on the hard drive, Lightroom DOES give you the option to delete the original raw files. However, that option is not available when downloading images from the camera or from the card using a card reader.

                                          • 18. Re: Automatically delete original RAW files while converting to DNG?
                                            AylwinC Level 1

                                            I guess Lightroom will load the DNG files after conversion and in that way it's able to verify them before deleting the RAW files.  I suppose the DNG converter can't reliably verify the DNG files so it's better to not have a delete option.

                                             

                                            In any case, thanks to you I've decide to be more careful so I quickly browse through the DNG files after conversion.  I've also made the following script to delete the RAW (and associated XMP) files only if the converted DNG files exist.

                                             

                                            #!/bin/bash
                                            rawfiles=$(find $1  -name "*.CR2" -o -name "*.ORF" | sed 's/ /\\-/g' |sed 's/CR2\\-/CR2 /g' |sed 's/ORF\\-/ORF /g')
                                            echo Only deleting RAW and XMP files with converted DNG files...
                                            for entry in $rawfiles
                                            do
                                            fixentry=$(echo $entry | sed 's/\\-/ /g')
                                            dngfile=$(echo $fixentry | sed 's/...$/dng/g')
                                            xmpfile=$(echo $fixentry | sed 's/...$/xmp/g')
                                            if [[ -f "$dngfile" && -f "$fixentry" ]]
                                            then
                                              #If DNG file exists, delete the RAW file
                                              rm "$fixentry"
                                              if [[ -f "$xmpfile" ]]
                                              then
                                                    #If there's also an XMP file, delete it too
                                                    rm "$xmpfile"
                                              fi
                                            fi
                                            done