10 Replies Latest reply on Apr 8, 2009 9:06 AM by SLRist

    Problem running DNG Converter from command line in Windows XP

      I'm a frustrated user trying to run Adobe DNG converter from the Windows command line - more specifically from a batch file.

      - Am reasonably conversant with writing batch files
      - Have read the PDF file provided by Adobe

      I just can't figure the correct syntax for adding the command line parameters and, unfortunately, the Adobe PDF file doesn't have verbose examples for idiots like me. Nor can I find any such examples on the Net, or any discussion of this problem in the forums.

      The Adobe PDF instructions state...
      "The parameter list includes the conversion options you want to use, followed by the names of the files to convert."

      As there is no switch to prefix 'the names of the files to convert' I assume I just leave a space and include the path to the source files at the end of the parameter list?

      Here is the batch file line I am trying to use...

      "C:\Program Files\Adobe\Adobe DNG Converter.exe [parameter list]"

      Where I want to specify in the [parameter list] that...

      (a) The destination directory (-d <directory> parameter) is c:\DNG_files
      (b) And the source files are in directory c:\RAW_files

      Here is the batch line with the parameters entered...

      "C:\Program Files\Adobe\Adobe DNG Converter.exe -dC:\RAW_files c:\DNG_files"

      I've tried variations of this with space between -d and C:\RAW_files and C:\DNG_files\*.* for the source files parameter.

      I just keep getting DOS erros like "The filename, directory name or volume label syntax is incorrect"

      Can anybody help me. I'm clueless how to solve the problem. :-(

      I'm running DNG COnverter version 4.2

      Thanks in anticipation.

      Rob
        • 1. Re: Problem running DNG Converter from command line in Windows XP
          Panoholic Level 2
          You put everything between one pair of quotation marks, therefor the entire string is regarded as the path and name of the file to execute.

          You *have to* put this:

          C:\Program Files\Adobe\Adobe DNG Converter.exe

          between quotation marks, because the idiots at Microsoft gave the standard program library a name with space in it, and the idots at Adobe gave the DNG converter a name with several spaces in it (and you lemming went along, instead of installing the program in a reasonably named library with a reasonable name).

          The rest must not be quoted, except if a path or file name contains spaces or special characters, and then only that parameter needs to be quited.
          • 2. Re: Problem running DNG Converter from command line in Windows XP
            Level 1
            Thanks for responding G Sch.

            LOL. Well this lemming doesn't habitually rename .exe files (e.g. Adobe DNG Converter.exe) to a non-spaced alternative either! (Adobe_DNG_Converter.exe)

            Still no luck...

            *** Here is my batch file...

            REM Copy and DNG-convert files from CF
            CD c:\RAW_files
            dir c:\RAW_files
            "C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files
            dir c:\DNG_files
            pause

            ***Here's the DOS shell output...
            <<BEGINS>>

            C:\RAW_files>dir c:\RAW_files
            Volume in drive C is Local Disk
            Volume Serial Number is D084-58ED

            Directory of c:\RAW_files

            12/03/2008 10:29 AM <DIR> .
            12/03/2008 10:29 AM <DIR> ..
            11/03/2008 07:00 AM 10,661,632 _3110455.ORF
            11/03/2008 07:01 AM 10,661,632 _3110457.ORF
            11/03/2008 07:01 AM 10,661,632 _3110458.ORF
            11/03/2008 07:02 AM 10,661,632 _3110460.ORF
            11/03/2008 07:02 AM 10,661,632 _3110461.ORF
            11/03/2008 07:03 AM 10,661,632 _3110462.ORF
            11/03/2008 07:03 AM 10,661,632 _3110463.ORF
            11/03/2008 07:04 AM 10,661,632 _3110464.ORF
            11/03/2008 07:04 AM 10,661,632 _3110465.ORF
            9 File(s) 95,954,688 bytes
            2 Dir(s) 2,619,731,968 bytes free

            C:\RAW_files>"C:\Program Files\Adobe\Adobe DNG Converter.exe" -d C:\DNG_files

            C:\RAW_files>dir c:\DNG_files
            Volume in drive C is Local Disk
            Volume Serial Number is D084-58ED

            Directory of c:\DNG_files

            12/03/2008 02:46 PM <DIR> .
            12/03/2008 02:46 PM <DIR> ..
            0 File(s) 0 bytes
            2 Dir(s) 2,619,731,968 bytes free

            C:\RAW_files>pause
            Press any key to continue . . .

            <<ENDS>>

            As you can see (a) Source files exist(b) DNG command line runs without generating an error (c) no output files in destination.

            DNG Converter did not run.

            If I remove everything after the command (i.e. the parameter list stuff) it fires up DNG Converter in interactive mode. Not what I'm after.

            Any other thoughts on what the problem is?

            Thank you.

            Rob
            • 3. Re: Problem running DNG Converter from command line in Windows XP
              Panoholic Level 2
              Rob,

              I'm sorry, I can't help you any further. I have never used the DNG converter in command line mode, I did not even know that it can be used that way and I don't have the manual you mentioned. My manual does not say a single word about command line usage.

              I answered only because the problem I saw is a generic DOS issue.
              • 4. Re: Problem running DNG Converter from command line in Windows XP
                Level 1
                OK. Never mind. Thanks anyway.

                Signed Lemming.

                Does anyone else have some clues?

                Thanks,
                Rob
                • 5. Re: Problem running DNG Converter from command line in Windows XP
                  JimHess-8IPblY Level 3
                  Sorry I don't have any clues. I'm just curious to know why you want to run the DNG converter from the command line. Are you trying to integrate it into other software you are writing, or something like that?
                  • 6. Re: Problem running DNG Converter from command line in Windows XP
                    Level 1
                    Hi, Jim. Yes, that's right. Integration. I want to be able to put a card in the flash reader and kick off a batch file to process and allocate the images to working directories. I can have several batch files for different workflows. The interactive version of DNG converter does a great job but at the expense of requiring more of my time to direct it.

                    I also use ImageIngesterPro to rename my files (more sophisticated functionality than DNG converter) and allocate them to relevant folders in my Digital Asset Management hierarchy.

                    Regards,
                    Rob
                    • 7. Re: Problem running DNG Converter from command line in Windows XP
                      I had never tried this before, but the command line did not make sense given normal DOS conventions.

                      Per Adobe documentation...
                      The parameter list includes the conversion options you want to use, followed by the names of the files to convert. Conversion options apply to all files listed on the command line.

                      -d <directory> Outputs converted files to the specified folder
                      (the default is the same folder as the input file).

                      The -d tells DNG to use the same directory as the input file, but you never provided an input file.

                      The following worked for me.

                      "C:\Program Files\Adobe\Adobe DNG Converter 4.3.1\Adobe DNG Converter.exe" -p1 "D:\Photos\2007-04-14 Chappell Hill Bluebonnet Festival\IMG_0001.CR2"

                      The documentation states you can append multiple file names, but I did not test that scenario. If you want to create a batch script to act against all files in a directory, you need to look at the documentation for the "FOR /F" command and for "substitution of FOR variable references". All of that information is provided using "help for". It's a bit tricky so you may want to Goggle some examples.

                      There probably is also a way to do this using a Windows script.

                      Or, just select the files you want to convert and drop them on top of a DNG desktop shortcut.

                      It's scary I remember so much DOS junk!

                      --bob
                      • 8. Re: Problem running DNG Converter from command line in Windows XP
                        Level 1
                        Bob,

                        Thanks very much for your input on this problem. Very kind of you to spare the time.

                        I tried a version of your command line that suits my environment. It works fine for a single, specified file. It seems I am coming unstuck in trying to get the command string to cater for wildcard filenames. The DNG Converter doesn't want to know about them!

                        I'll probably abandon the idea. Thanks for your suggestion about the 'FOR' DOS way of doing it. That would probably work but getting it to work may cost me more time than that which I'm trying to save by the original endeavour!

                        Kind regards,
                        Rob
                        • 9. Re: Problem running DNG Converter from command line in Windows XP
                          Level 1
                          Well Bob, you're a champion! You got me on the right path and now I have success.

                          <BATCH FILE STARTS>
                          REM Copy and DNG-convert files from CF to directory c:\@DNG

                          For %%a in (e:\DCIM\Olymp100\*.orf) do "C:\Program Files\Adobe\Adobe DNG Converter.exe" -d c:\@DNG %%a

                          dir c:\@DNG
                          pause
                          <BATCH FILE ENDS>

                          Thanks very much,
                          Rob
                          • 10. Re: Problem running DNG Converter from command line in Windows XP

                            Well done - that is a very nice use of DOS command line scripting.

                             

                            I have my import workflow automated as follows (from my Nikon D300 shooting NEFs to DNG format in Lightroom2):

                             

                             

                            1. Insert CompactFlash card into media reader (Drive I:)

                             

                            2. I have SyncBackPro running, which automatically runs a 'Move' script when any card is inserted in to I: Moving (and verifying) *.NEF from the CompactFlash card into folder A

                             

                            3. SyncBackPro kicks off my file processing batchfile following the Move process.

                             

                            4. Line 1. in the batchfile runs the Adobe DNG converter which converts *.NEF in folder A to *.DNG in folder B.

                             

                            5. Line 2 in the batchfile moves *.NEF from folder A into an archive folder using the DOS 'MOVE' command.

                             

                            6. Lightroom 2 Auto-Import is constantly scanning folder B, and when it sees files there, it automatically imports them and moves them to folder C.

                             

                             

                            So the process runs:

                             

                            [CompactFlash] =(SyncBackPro Move)=> [Folder A] =(Adobe DNG Converter)=> [Folder B] =(Lightroom Auto-Import)=> [Folder C]

                             

                             

                             

                            So the whole process from inserting the card to the files getting converted and appearing in Lightroom is automated.

                             

                            I have a similar process which is set up to process the CR2 files from my Canon G9, except that it looks on drive J: (the SD card slot).