7

I'm using the EXIF Tool to Copy all the EXIF Tags using the following command

exiftool -TagsFromFile file1 file2

But if a file named file2 already exists in the source folder, I need the EXIF Tool to replace it.Currently, it is renaming the file as _orginal

How can I do this?

SynozeN Technologies
  • 1,337
  • 1
  • 14
  • 19
techno
  • 6,100
  • 16
  • 86
  • 192
  • what language of programming or where do you use the command windows console, linux console etc.? – Adisak Anusornsrirung May 24 '17 at 03:30
  • What do you want to replace ``file2``, which is your input file, with? – J.N. May 24 '17 at 03:55
  • @AdisakAnusornsrirung In windows 'cmd' – techno May 24 '17 at 04:46
  • @J.N. file1 is the input file,file 2 is the output file .. i have just specified the syntax.If file1.FileName=file2.FileName then file2 should be replaced..instead of making a copy of the original. – techno May 24 '17 at 04:48
  • If you are using this version of ``exiftool`` (http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html), it looks like you'll have to use the ``-o`` flag to designate ``file2`` as being your output file. – J.N. May 24 '17 at 04:52
  • @J.N. So i guess `exiftool -o -TagsFromFile file1 file2` – techno May 24 '17 at 04:57
  • That won't work... try reading about the command line, and how to use parameters: http://linuxcommand.org/lc3_learning_the_shell.php (This one is a Linux tutorial, but the principle of passing parameters is the same on Windows) – J.N. May 24 '17 at 05:03

1 Answers1

13

Add the -overwrite_original option to your exiftool command

Yves M.
  • 29,855
  • 23
  • 108
  • 144
PhilHarvey
  • 886
  • 7
  • 9