Page 1 of 1

Help needed with forfiles.

Posted: 04 Nov 2015 07:29
by Nukhem
Hi,

I'm using 2 different command line tools (x3f_extract.exe & exiftool.exe) to convert my digital camera X3F raw files to a more user friendly Adobe DNG format. I have to do this one file at the time wich is alot of work and time spending.

I have a X3F raw file : 'testimage.x3f'

I convert that file to a DNG raw file 'testimage.x3f.dng' using the following command:

Code: Select all

x3f_extract -wb Daylight testimage.x3f 


The output of this command: testimage.x3f.dng doesn't contain the neccesary exif info so i use the freeware exiftool.exe tool to copy the exif metadata from the original X3F file to the newly made DNG file. I'm using the following command to do this:

Code: Select all

exiftool -TagsFromFile testimage.x3f "-all:all>all:all" testimage.x3f.dng


which gives me the final file i can use in Adobe Lightroom.

I just got home from holiday and about to work through 1000 of such images i'm looking to automate these commands using a batch file. I was experimenting with forfiles using the following command which doesn't seem to work:

Code: Select all

x3f_extract -wb Daylight *.x3f
forfiles /m *.x3f /c "exiftool -TagsFromFile @FILE "-all:all>all:all" @FILE.dng"


Can anybody help me finding what i'm doing wrong?

Re: Help needed with forfiles.

Posted: 04 Nov 2015 09:11
by Squashman
No need to use FORFILES. A normal FOR command will be just fine.

Code: Select all

@ECHO OFF
FOR %%G in (*.x3f) DO (
   x3f_extract -wb Daylight "%%G"
   exiftool -TagsFromFile "%%G" "-all:all>all:all" "%%G.dng"
)

Re: Help needed with forfiles.

Posted: 07 Nov 2015 11:23
by Samir
Squashman wrote:No need to use FORFILES. A normal FOR command will be just fine.

Code: Select all

@ECHO OFF
FOR %%G in (*.x3f) DO (
   x3f_extract -wb Daylight "%%G"
   exiftool -TagsFromFile "%%G" "-all:all>all:all" "%%G.dng"
)
That's what I was thinking too.

I was also trying to think of a way to do this all on one command line, but don't think && between the commands will do it.

Re: Help needed with forfiles.

Posted: 10 Nov 2015 04:33
by foxidrive
Nukhem wrote:Can anybody help me finding what i'm doing wrong?


I hope Squashman helped you.