Author Topic: process image files without extension and rename  (Read 1330 times)

a1s2d3f4

  • Newbie
  • *
  • Posts: 3
process image files without extension and rename
« on: July 29, 2014, 07:07:14 PM »
I have a bunch of files without extensions, some of which are jpeg (Exif) photo files. Still others are .mov files.

I wanted to use ExifTool (command line, of course) to run through each and every file in the directory of such files, and rename all the Exif jpegs to %Y%M%D_%H%M-%S.jpeg format, based on date picture was taken.

One command given in the help allows to process the files in the appropriate way, but only if they already have "jpeg" extension.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: process image files without extension and rename
« Reply #1 on: July 29, 2014, 07:18:40 PM »
To process only files without an extension, use -ext "" or -ext . .

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

a1s2d3f4

  • Newbie
  • *
  • Posts: 3
Re: process image files without extension and rename
« Reply #2 on: July 30, 2014, 12:37:01 PM »
Perfect - I tried it and it works.

 exiftool.exe -ext "" -d %Y%m%d_%H%M-%S%%-c.jpeg "-filename<CreateDate" d:\temp\test\

Is there a similar way to process my extension-less MOV files?
If I do .mov instead of .jpeg above, it gives jpeg photos .mov extension...


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: process image files without extension and rename
« Reply #3 on: July 30, 2014, 12:40:36 PM »
You could do something like this:

exiftool.exe -ext "" -d %Y%m%d_%H%M-%S%%-c "-filename<$CreateDate.$filetype" d:\temp\test\

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

a1s2d3f4

  • Newbie
  • *
  • Posts: 3
Re: process image files without extension and rename
« Reply #4 on: July 31, 2014, 01:02:48 PM »
Perfect help. Now onto the next challenge...