News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

How to rename recovered .jpg files to original Canon names in windows 10?

Started by gczerw, October 22, 2016, 05:01:15 PM

Previous topic - Next topic

Hayo Baan

Have you already tried moving the file by hand? It could be that you simply do not have enough rights on those files and directories (though in that case I would have expected an error from exiftool too).
Hayo Baan – Photography
Web: www.hayobaan.nl

gczerw

I have no problem renaming files, creating directories and moving files manually.  I am trying to avoid doing this because there are well over 2,000 of them.  That's why I was hoping that exiftool would be able to do this for me.  But alas, for me, windows is not playing nicely with exiftool.

Phil Harvey

I'll run some tests myself when I can and post back here if I come up with any other ideas.  One possibility is this:

exiftool -p "mkdir ${filenumber;tr/-/_/;$_=substr($_,0,6)}" -p "move $directory\$filename ${filenumber;tr/-/_/;$_=substr($_,0,6)}\IMG${FileNumber;s/.*-//}.${filename;s/.*\.//}" . > do_rename.bat

Then type "do_rename" to run the batch file and rename/move the files.  Check the .bat file first to make sure it looks good.  The only problem here is that you can't use %c, and I don't know what the windows "move" command does if it finds a duplicate file name.

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

gczerw

Thanks for your help and patience!  The last instruction worked well for me.  I had to use the Bulk Rename Utility to get the additional "_" into the filenames, but it was easy to do!  Now all I have to do is get those images back onto the camera so that it recognizes them!  Simply copying them back onto the memory card doesn't allow them to be recognized by the camera.  There must be a way to reindex so that the camera knows that those images are there.

Phil Harvey

Ah, right.  I forgot you wanted an underscore after "IMG".  This would have been the command then:

exiftool -p "mkdir ${filenumber;tr/-/_/;$_=substr($_,0,6)}" -p "move $directory\$filename ${filenumber;tr/-/_/;$_=substr($_,0,6)}\IMG_${FileNumber;s/.*-//}.${filename;s/.*\.//}" . > do_rename.bat

There may be other support files on the camera that are needed.  I can't help much with that, but you should be able to figure it out by taking a couple of pictures with the camera then looking at the files on the memory card.

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

gczerw

Thanks for the reply. The Canon utilities are a PITA.  I finally figured out that after taking 1 picture, the camera indexed the 3 files that I had copied onto the card manually.  So I just removed the card, placed it into my PC, and copied the 40 directories containing all of the files back onto the card.  When I put the card back into the camera and turned it on, it saw and re-indexed everything!

If you ever have any inkling regarding why windows was so problematic, and want me to test something, I'd be happy to.

Phil Harvey

Glad you figured out the camera situation.

Regarding the renaming problem: Did you ever try a simpler command to see if it works?:

exiftool -filename=test2.txt test1.txt

(making sure that test1.txt exists and test2.txt doesn't before executing the command)

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

gczerw


Doesn't work...

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -filename=test2.jpg IMG_200.jpg
    1 image files updated

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/25/2016  08:18 PM    <DIR>          .
10/25/2016  08:18 PM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
06/23/2015  01:11 PM           186,212 IMG_200.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,850,887 bytes
               5 Dir(s)  914,742,861,824 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>

Phil Harvey

OK, thanks.  I just tried this simple command on my Windows 10 machine and it worked fine.  Also, I haven't seen anyone else with problems like yours, so we have narrowed it down to something different about your Windows 10 system.  I'll post back here if I have any more ideas.

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

gczerw

Interesting, I ran that command a second time and got the following:

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -filename=test2.jpg IMG_200.jpg
Error: 'test2.jpg' already exists - IMG_200.jpg
    0 image files updated
    1 files weren't updated due to errors

But when I issued a dir command, test2.jpg is nowhere to be seen!

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/25/2016  08:18 PM    <DIR>          .
10/25/2016  08:18 PM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
06/23/2015  01:11 PM           186,212 IMG_200.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,850,887 bytes
               5 Dir(s)  914,725,625,856 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>

Phil Harvey

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

gczerw

Apparently not...

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -v test2.jpg
File not found: test2.jpg


Holy crap!  I just rebooted the machine after it processed several "updates" from M$ and now get this! Yer gonna love it!


C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -filename=test2.jpg IMG_200.jpg
    1 image files updated

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/25/2016  08:18 PM    <DIR>          .
10/25/2016  08:18 PM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
06/23/2015  01:11 PM           186,212 IMG_200.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,850,887 bytes
               5 Dir(s)  913,515,261,952 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -v test2.jpg
  ExifToolVersion = 10.31
  FileName = test2.jpg
  Directory = .
  FileSize = 186212
  FileModifyDate = 1435079486
  FileAccessDate = 1477440868.16305
  FileCreateDate = 1477440868.16305
  FilePermissions = 33206
  FileType = JPEG
  FileTypeExtension = JPG
  MIMEType = image/jpeg
JPEG APP1 (13820 bytes):
  ExifByteOrder = II
  + [IFD0 directory with 10 entries]
  | 0)  ImageDescription =
  | 1)  Make = Canon
  | 2)  Model = Canon PowerShot ELPH 520 HS
  | 3)  Orientation = 1
  | 4)  XResolution = 180 (180/1)
  | 5)  YResolution = 180 (180/1)
  | 6)  ResolutionUnit = 2
  | 7)  ModifyDate = 2015:06:23 13:11:26
  | 8)  YCbCrPositioning = 2
  | 9)  ExifOffset (SubDirectory) -->
  | + [ExifIFD directory with 34 entries]
  | | 0)  ExposureTime = 0.003125 (1/320)
  | | 1)  FNumber = 3.4 (34/10)
  | | 2)  ISO = 100
  | | 3)  SensitivityType = 4
  | | 4)  ExifVersion = 0230
  | | 5)  DateTimeOriginal = 2015:06:23 13:11:26
  | | 6)  CreateDate = 2015:06:23 13:11:26
  | | 7)  ComponentsConfiguration = 1 2 3 0
  | | 8)  CompressedBitsPerPixel = 3 (3/1)
  | | 9)  ShutterSpeedValue = 8.3125 (266/32)
  | | 10) ApertureValue = 3.53125 (113/32)
  | | 11) ExposureCompensation = -0.3333333333 (-1/3)
  | | 12) MaxApertureValue = 3.53125 (113/32)
  | | 13) MeteringMode = 5
  | | 14) Flash = 16
  | | 15) FocalLength = 4 (4000/1000)
  | | 16) MakerNoteCanon (SubDirectory) -->
  | | + [MakerNotes directory with 29 entries]
  | | | 0)  CanonCameraSettings (SubDirectory) -->
  | | | + [BinaryData directory, 96 bytes]
  | | | | MacroMode = 2
  | | | | SelfTimer = 0
  | | | | Quality = 3
  | | | | CanonFlashMode = 0
  | | | | ContinuousDrive = 0
  | | | | FocusMode = 4
  | | | | RecordMode = 1
  | | | | CanonImageSize = 2
  | | | | EasyMode = 1
  | | | | DigitalZoom = 0
  | | | | Contrast = 0
  | | | | Saturation = 0
  | | | | Sharpness = 0
  | | | | CameraISO = 15
  | | | | MeteringMode = 3
  | | | | FocusRange = 1
  | | | | AFPoint = 16390
  | | | | CanonExposureMode = 1
  | | | | LensType = 65535
  | | | | MaxFocalLength = 48000
  | | | | MinFocalLength = 4000
  | | | | FocalUnits = 1000
  | | | | MaxAperture = 113
  | | | | MinAperture = 192
  | | | | FlashActivity = -1
  | | | | FlashBits = 0
  | | | | FocusContinuous = 1
  | | | | AESetting = 0
  | | | | ImageStabilization = 257
  | | | | DisplayAperture = 34
  | | | | ZoomSourceWidth = 3648
  | | | | ZoomTargetWidth = 3648
  | | | | SpotMeteringMode = 0
  | | | | PhotoEffect = -1
  | | | | ManualFlashOutput = 0
  | | | | ColorTone = 32767
  | | | | SRAWQuality = -1
  | | | 1)  CanonFlashInfo = 0 0 0 0
  | | | 2)  CanonShotInfo (SubDirectory) -->
  | | | + [BinaryData directory, 68 bytes]
  | | | | AutoISO = -35
  | | | | BaseISO = 192
  | | | | MeasuredEV = 232
  | | | | TargetAperture = 113
  | | | | TargetExposureTime = 266
  | | | | ExposureCompensation = -12
  | | | | WhiteBalance = 0
  | | | | SlowShutter = 0
  | | | | SequenceNumber = 0
  | | | | OpticalZoomCode = 0
  | | | | FlashGuideNumber = 0
  | | | | AFPointsInFocus = 0
  | | | | FlashExposureComp = 0
  | | | | AutoExposureBracketing = 0
  | | | | AEBBracketValue = 0
  | | | | ControlMode = 1
  | | | | FocusDistanceUpper = 65
  | | | | FocusDistanceLower = 0
  | | | | FNumber = 115
  | | | | ExposureTime = 261
  | | | | MeasuredEV2 = 0
  | | | | BulbDuration = 0
  | | | | CameraType = 250
  | | | | AutoRotate = 0
  | | | | NDFilter = 0
  | | | | SelfTimer2 = 0
  | | | | FlashOutput = 0
  | | | 3)  CanonImageType = IMG:PowerShot ELPH 520 HS JPEG
  | | | 4)  CanonFirmwareVersion = Firmware Version 1.00
  | | | 5)  FileNumber = 1102200
  | | | 6)  CanonCameraInfoUnknown32 (SubDirectory) -->
  | | | + [BinaryData directory, 2108 bytes]
  | | | | CameraTemperature = 32
  | | | 7)  CanonModelID = 52756480
  | | | 8)  ThumbnailImageValidArea = 0 0 0 0
  | | | 9)  Canon_0x0018 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [snip]
  | | | 10) Canon_0x0019 = 1
  | | | 11) DateStampMode = 0
  | | | 12) MyColors (SubDirectory) -->
  | | | + [BinaryData directory, 32 bytes]
  | | | | MyColorMode = 0
  | | | 13) FirmwareRevision = 16778240
  | | | 14) Canon_0x001f = 138 1 0 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [snip]
  | | | 15) Canon_0x0022 = 416 0 0 16 8 1 1 640 480 0 0 0 0 0 8 384 0 0 0 0 0 0 0 0 0 0[snip]
  | | | 16) Categories = 8 0
  | | | 17) CanonAFInfo2 (SubDirectory) -->
  | | | + [SerialData directory, 98 bytes]
  | | | | 0)  AFInfoSize = 98
  | | | | 1)  AFAreaMode = 2
  | | | | 2)  NumAFPoints = 9
  | | | | 3)  ValidAFPoints = 1
  | | | | 4)  CanonImageWidth = 640
  | | | | 5)  CanonImageHeight = 480
  | | | | 6)  AFImageWidth = 3648
  | | | | 7)  AFImageHeight = 2736
  | | | | 8)  AFAreaWidths = 345 -1 12320 0 13692 25100 -3104 -25160 24060
  | | | | 9)  AFAreaHeights = 342 0 -20012 0 4444 4444 19 3599 574
  | | | | 10) AFAreaXPositions = 0 10400 -25236 4440 10492 10492 1 9620 -20012
  | | | | 11) AFAreaYPositions = 0 512 -25232 5140 5140 0 4440 -20012 4440
  | | | | 12) AFPointsInFocus = 1
  | | | | 13) Canon_AFInfo2_0x000d = 0 0
  | | | | 14) PrimaryAFPoint = 0
  | | | 18) ContrastInfo (SubDirectory) -->
  | | | + [BinaryData directory, 26 bytes]
  | | | | IntelligentContrast = 0
  | | | 19) ImageUniqueID = ..4w....j.s.L...
  | | | 20) Canon_0x002d = 0
  | | | 21) Canon_0x002e = 20 32767 32767 65535 65535 32767 32767 0 60 65535
  | | | 22) FaceDetect3 (SubDirectory) -->
  | | | + [BinaryData directory, 34 bytes]
  | | | | FacesDetected = 0
  | | | 23) Canon_0x0031 = 12 1 65535 65535 65535 65535
  | | | 24) Canon_0x0032 = 28 1 0 1999908353 2393892277 2457071978 4208304716
  | | | 25) Canon_0x0033 = 3267895370 2393853607 2457071978 4208304716
  | | | 26) TimeInfo (SubDirectory) -->
  | | | + [BinaryData directory, 16 bytes]
  | | | | TimeZone = 60
  | | | | TimeZoneCity = 0
  | | | | DaylightSavings = 0
  | | | 27) AspectInfo (SubDirectory) -->
  | | | + [BinaryData directory, 20 bytes]
  | | | | AspectRatio = 2
  | | | | CroppedImageWidth = 640
  | | | | CroppedImageHeight = 480
  | | | | CroppedImageLeft = 0
  | | | | CroppedImageTop = 0
  | | | 28) VRDOffset = 0
  | | 17) UserComment =
  | | 18) FlashpixVersion = 0100
  | | 19) ColorSpace = 1
  | | 20) ExifImageWidth = 640
  | | 21) ExifImageHeight = 480
  | | 22) InteropOffset (SubDirectory) -->
  | | + [InteropIFD directory with 4 entries]
  | | | 0)  InteropIndex = R98
  | | | 1)  InteropVersion = 0100
  | | | 2)  RelatedImageWidth = 640
  | | | 3)  RelatedImageHeight = 480
  | | 23) FocalPlaneXResolution = 3333.333333 (640000/192)
  | | 24) FocalPlaneYResolution = 3333.333333 (480000/144)
  | | 25) FocalPlaneResolutionUnit = 2
  | | 26) SensingMethod = 2
  | | 27) FileSource = 3
  | | 28) CustomRendered = 0
  | | 29) ExposureMode = 1
  | | 30) WhiteBalance = 0
  | | 31) DigitalZoomRatio = 1 (3648/3648)
  | | 32) SceneCaptureType = 0
  | | 33) OwnerName =
  + [IFD1 directory with 6 entries]
  | 0)  Compression = 6
  | 1)  XResolution = 180 (180/1)
  | 2)  YResolution = 180 (180/1)
  | 3)  ResolutionUnit = 2
  | 4)  ThumbnailOffset = 5620
  | 5)  ThumbnailLength = 5391
JPEG APP1 (4092 bytes):
  + [XMP directory, 4063 bytes]
  | Rating = 0
JPEG DQT (130 bytes):
JPEG SOF0 (15 bytes):
  ImageWidth = 640
  ImageHeight = 480
  EncodingProcess = 0
  BitsPerSample = 8
  ColorComponents = 3
JPEG DHT (416 bytes):
JPEG SOS

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/25/2016  08:18 PM    <DIR>          .
10/25/2016  08:18 PM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
06/23/2015  01:11 PM           186,212 IMG_200.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,850,887 bytes
               5 Dir(s)  913,514,049,536 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>dir test2.jpg
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

File Not Found

C:\Users\George\Downloads\testdisk-7.0\recover>dir /AH
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

File Not Found

C:\Users\George\Downloads\testdisk-7.0\recover>dir

Phil Harvey

Yes.  This is was I was expecting would happen.  It seems that Windows somehow maintains two names for each file, and for some reason they aren't properly synchronized for this file.  Are there perhaps some system settings to allow old 8.3 file names?  A wild guess is that maybe this has something to do with the 8.3 file name settings.  You could try disabling this.  See example 5 here for how to do this on a volume, or apparently this command does it on a system-wide basis:

reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v "NtfsDisable8dot3NameCreation" /t REG_DWORD /d 1 /f

Apparently doing this will also make the filesystem more efficient (ref).

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

gczerw


I tried, but it made no difference!  See below:

C:\WINDOWS\system32>fsutil 8dot3name set c: 1
Successfully disabled 8dot3name generation on c:

C:\WINDOWS\system32>fsutil 8dot3name strip /s /v c:\
<SNIP>
Total affected registry keys:                 502

The operation failed because registry entries refer to 8dot3 names in the
specified path.
For details on the affected registry keys please see the log:
  "C:\Users\George\AppData\Local\Temp\8dot3_removal_log @(GMT 2016-10-28 13-02-00).log"

BTW -- That logfile is 241kb in size!

C:\WINDOWS\system32>fsutil 8dot3name set c: 1
Successfully disabled 8dot3name generation on c:

C:\WINDOWS\system32>

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/25/2016  08:18 PM    <DIR>          .
10/25/2016  08:18 PM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
06/23/2015  01:11 PM           186,212 IMG_200.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,850,887 bytes
               5 Dir(s)  913,187,508,224 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -filename=testosterone.jpg IMG_0631.jpg
    1 image files updated

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/28/2016  09:24 AM    <DIR>          .
10/28/2016  09:24 AM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
10/02/2013  06:19 PM           130,153 IMG_0631.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,794,828 bytes
               5 Dir(s)  913,243,140,096 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>exiftool -v testosterone.jpg
  ExifToolVersion = 10.31
  FileName = testosterone.jpg
  Directory = .
  FileSize = 130153
  FileModifyDate = 1380752344
  FileAccessDate = 1477661053.06315
  FileCreateDate = 1477661053.06315
  FilePermissions = 33206
  FileType = JPEG
  FileTypeExtension = JPG
  MIMEType = image/jpeg
JPEG APP1 (13820 bytes):
  ExifByteOrder = II
  + [IFD0 directory with 10 entries]
  | 0)  ImageDescription =
  | 1)  Make = Canon
  | 2)  Model = Canon PowerShot ELPH 520 HS
  | 3)  Orientation = 1
  | 4)  XResolution = 180 (180/1)
  | 5)  YResolution = 180 (180/1)
  | 6)  ResolutionUnit = 2
  | 7)  ModifyDate = 2013:10:02 18:19:03
  | 8)  YCbCrPositioning = 2
  | 9)  ExifOffset (SubDirectory) -->
  | + [ExifIFD directory with 34 entries]
  | | 0)  ExposureTime = 0.002 (1/500)
  | | 1)  FNumber = 5.6 (56/10)
  | | 2)  ISO = 100
  | | 3)  SensitivityType = 4
  | | 4)  ExifVersion = 0230
  | | 5)  DateTimeOriginal = 2013:10:02 18:19:03
  | | 6)  CreateDate = 2013:10:02 18:19:03
  | | 7)  ComponentsConfiguration = 1 2 3 0
  | | 8)  CompressedBitsPerPixel = 3 (3/1)
  | | 9)  ShutterSpeedValue = 8.96875 (287/32)
  | | 10) ApertureValue = 4.96875 (159/32)
  | | 11) ExposureCompensation = -0.3333333333 (-1/3)
  | | 12) MaxApertureValue = 4.96875 (159/32)
  | | 13) MeteringMode = 5
  | | 14) Flash = 16
  | | 15) FocalLength = 48 (48000/1000)
  | | 16) MakerNoteCanon (SubDirectory) -->
  | | + [MakerNotes directory with 29 entries]
  | | | 0)  CanonCameraSettings (SubDirectory) -->
  | | | + [BinaryData directory, 96 bytes]
  | | | | MacroMode = 2
  | | | | SelfTimer = 0
  | | | | Quality = 3
  | | | | CanonFlashMode = 0
  | | | | ContinuousDrive = 0
  | | | | FocusMode = 4
  | | | | RecordMode = 1
  | | | | CanonImageSize = 2
  | | | | EasyMode = 1
  | | | | DigitalZoom = 3
  | | | | Contrast = 0
  | | | | Saturation = 0
  | | | | Sharpness = 0
  | | | | CameraISO = 15
  | | | | MeteringMode = 3
  | | | | FocusRange = 1
  | | | | AFPoint = 16390
  | | | | CanonExposureMode = 1
  | | | | LensType = 65535
  | | | | MaxFocalLength = 48000
  | | | | MinFocalLength = 4000
  | | | | FocalUnits = 1000
  | | | | MaxAperture = 159
  | | | | MinAperture = 192
  | | | | FlashActivity = -1
  | | | | FlashBits = 0
  | | | | FocusContinuous = 1
  | | | | AESetting = 0
  | | | | ImageStabilization = 257
  | | | | DisplayAperture = 0
  | | | | ZoomSourceWidth = 1024
  | | | | ZoomTargetWidth = 3648
  | | | | SpotMeteringMode = 0
  | | | | PhotoEffect = -1
  | | | | ManualFlashOutput = 0
  | | | | ColorTone = 32767
  | | | | SRAWQuality = -1
  | | | 1)  CanonFlashInfo = 0 0 0 0
  | | | 2)  CanonShotInfo (SubDirectory) -->
  | | | + [BinaryData directory, 68 bytes]
  | | | | AutoISO = -35
  | | | | BaseISO = 192
  | | | | MeasuredEV = 312
  | | | | TargetAperture = 159
  | | | | TargetExposureTime = 287
  | | | | ExposureCompensation = -12
  | | | | WhiteBalance = 0
  | | | | SlowShutter = 0
  | | | | SequenceNumber = 0
  | | | | OpticalZoomCode = 100
  | | | | FlashGuideNumber = 0
  | | | | AFPointsInFocus = 0
  | | | | FlashExposureComp = 0
  | | | | AutoExposureBracketing = 0
  | | | | AEBBracketValue = 0
  | | | | ControlMode = 1
  | | | | FocusDistanceUpper = 927
  | | | | FocusDistanceLower = 0
  | | | | FNumber = 161
  | | | | ExposureTime = 292
  | | | | MeasuredEV2 = 0
  | | | | BulbDuration = 0
  | | | | CameraType = 250
  | | | | AutoRotate = 0
  | | | | NDFilter = 0
  | | | | SelfTimer2 = 0
  | | | | FlashOutput = 0
  | | | 3)  CanonImageType = IMG:PowerShot ELPH 520 HS JPEG
  | | | 4)  CanonFirmwareVersion = Firmware Version 1.00
  | | | 5)  FileNumber = 1020631
  | | | 6)  CanonCameraInfoUnknown32 (SubDirectory) -->
  | | | + [BinaryData directory, 2108 bytes]
  | | | | CameraTemperature = 24
  | | | 7)  CanonModelID = 52756480
  | | | 8)  ThumbnailImageValidArea = 0 0 0 0
  | | | 9)  Canon_0x0018 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [snip]
  | | | 10) Canon_0x0019 = 1
  | | | 11) DateStampMode = 0
  | | | 12) MyColors (SubDirectory) -->
  | | | + [BinaryData directory, 32 bytes]
  | | | | MyColorMode = 0
  | | | 13) FirmwareRevision = 16778240
  | | | 14) Canon_0x001f = 138 1 0 4 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [snip]
  | | | 15) Canon_0x0022 = 416 0 0 16 8 1 1 640 480 0 0 0 0 0 8 384 0 0 0 0 0 0 0 0 0 0[snip]
  | | | 16) Categories = 8 0
  | | | 17) CanonAFInfo2 (SubDirectory) -->
  | | | + [SerialData directory, 98 bytes]
  | | | | 0)  AFInfoSize = 98
  | | | | 1)  AFAreaMode = 2
  | | | | 2)  NumAFPoints = 9
  | | | | 3)  ValidAFPoints = 1
  | | | | 4)  CanonImageWidth = 640
  | | | | 5)  CanonImageHeight = 480
  | | | | 6)  AFImageWidth = 3648
  | | | | 7)  AFImageHeight = 2736
  | | | | 8)  AFAreaWidths = 345 9620 -20012 507 1 12276 99 -25160 24060
  | | | | 9)  AFAreaHeights = 342 -20012 9596 512 536 -20012 19 3599 574
  | | | | 10) AFAreaXPositions = 0 10492 9122 10812 100 -20028 1 10400 10492
  | | | | 11) AFAreaYPositions = 0 9596 99 99 9596 -25184 0 9600 99
  | | | | 12) AFPointsInFocus = 1
  | | | | 13) Canon_AFInfo2_0x000d = 0 0
  | | | | 14) PrimaryAFPoint = 0
  | | | 18) ContrastInfo (SubDirectory) -->
  | | | + [BinaryData directory, 26 bytes]
  | | | | IntelligentContrast = 0
  | | | 19) ImageUniqueID = `(..?...j.s.L...
  | | | 20) Canon_0x002d = 0
  | | | 21) Canon_0x002e = 20 32767 32767 65535 65535 32767 32767 0 65296 65535
  | | | 22) FaceDetect3 (SubDirectory) -->
  | | | + [BinaryData directory, 34 bytes]
  | | | | FacesDetected = 0
  | | | 23) Canon_0x0031 = 12 1 65535 65535 65535 65535
  | | | 24) Canon_0x0032 = 28 1 0 98969696 2393893439 2457071978 4208304716
  | | | 25) Canon_0x0033 = 3267895370 2393853607 2457071978 4208304716
  | | | 26) TimeInfo (SubDirectory) -->
  | | | + [BinaryData directory, 16 bytes]
  | | | | TimeZone = -240
  | | | | TimeZoneCity = 0
  | | | | DaylightSavings = 60
  | | | 27) AspectInfo (SubDirectory) -->
  | | | + [BinaryData directory, 20 bytes]
  | | | | AspectRatio = 2
  | | | | CroppedImageWidth = 640
  | | | | CroppedImageHeight = 480
  | | | | CroppedImageLeft = 0
  | | | | CroppedImageTop = 0
  | | | 28) VRDOffset = 0
  | | 17) UserComment =
  | | 18) FlashpixVersion = 0100
  | | 19) ColorSpace = 1
  | | 20) ExifImageWidth = 640
  | | 21) ExifImageHeight = 480
  | | 22) InteropOffset (SubDirectory) -->
  | | + [InteropIFD directory with 4 entries]
  | | | 0)  InteropIndex = R98
  | | | 1)  InteropVersion = 0100
  | | | 2)  RelatedImageWidth = 640
  | | | 3)  RelatedImageHeight = 480
  | | 23) FocalPlaneXResolution = 11875 (2280000/192)
  | | 24) FocalPlaneYResolution = 11875 (1710000/144)
  | | 25) FocalPlaneResolutionUnit = 2
  | | 26) SensingMethod = 2
  | | 27) FileSource = 3
  | | 28) CustomRendered = 0
  | | 29) ExposureMode = 1
  | | 30) WhiteBalance = 0
  | | 31) DigitalZoomRatio = 3.5625 (3648/1024)
  | | 32) SceneCaptureType = 0
  | | 33) OwnerName =
  + [IFD1 directory with 6 entries]
  | 0)  Compression = 6
  | 1)  XResolution = 180 (180/1)
  | 2)  YResolution = 180 (180/1)
  | 3)  ResolutionUnit = 2
  | 4)  ThumbnailOffset = 5620
  | 5)  ThumbnailLength = 5526
JPEG APP1 (4092 bytes):
  + [XMP directory, 4063 bytes]
  | Rating = 0
JPEG DQT (130 bytes):
JPEG SOF0 (15 bytes):
  ImageWidth = 640
  ImageHeight = 480
  EncodingProcess = 0
  BitsPerSample = 8
  ColorComponents = 3
JPEG DHT (416 bytes):
JPEG SOS

C:\Users\George\Downloads\testdisk-7.0\recover>dir
Volume in drive C is Windows
Volume Serial Number is B02E-BE7C

Directory of C:\Users\George\Downloads\testdisk-7.0\recover

10/28/2016  09:24 AM    <DIR>          .
10/28/2016  09:24 AM    <DIR>          ..
10/25/2016  07:38 PM    <DIR>          Canon
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/22/2016  12:07 PM           126,249 exiftool.txt
10/25/2016  07:34 PM    <DIR>          Final
10/02/2013  06:19 PM           130,153 IMG_0631.jpg
10/22/2016  11:42 AM           167,424 jhead.exe
10/25/2016  07:02 PM    <DIR>          movies
08/21/2016  08:21 PM            34,517 versions.txt
               6 File(s)      7,794,828 bytes
               5 Dir(s)  913,241,546,752 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover>del testosterone.jpg
Could Not Find C:\Users\George\Downloads\testdisk-7.0\recover\testosterone.jpg

C:\Users\George\Downloads\testdisk-7.0\recover>

Phil Harvey

OK.  Well it was just a shot in the dark.

Windows is a peculiar beast.

I'll post back here if I have any other bright ideas.

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