ExifTool Forum

ExifTool => Newbies => Topic started by: gczerw on October 22, 2016, 05:01:15 PM

Title: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 22, 2016, 05:01:15 PM
Using photorec, I have recovered a few thousand .jpg files that are in 5 directories.  I have tried the following command, found on the "http://www.cgsecurity.org/wiki/After_Using_PhotoRec" page, to no avail!

     The following command recreates the original directory layout and file names present on the card (for Canon cameras, tested with numerous photos from an EOS 20D), using the file number EXIF info. ExifTool works under both Windows and Linux.

exiftool -r '-FileName<IMG_${FileIndex}%c.%e' DIR

It uses FileIndex from EXIF information in file to rename to original filename, the %c is checking for duplicate names and appends other digit to the name. And it works recursively (-r).

As a test, I have placed one .jpg file in the "new" directory and have tried the following, with the result shown:

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool "-FileName<IMG_${FileIndex}%c.%e" .
Warning: [minor] Tag 'FileIndex' not defined - ./IMG_102-0631.jpg
Warning: No writable tags set from ./IMG_102-0631.jpg
    1 directories scanned
    0 image files updated
    1 image files unchanged

Can someone tell me what is wrong here?  File information shown below.

======== ../new/dead.jpg
ExifTool Version Number         : 9.13
File Name                       : dead.jpg
Directory                       : ../new
File Size                       : 84 kB
File Modification Date/Time     : 2015:10:01 15:12:08-05:00
File Access Date/Time           : 2016:10:22 14:28:55-05:00
File Inode Change Date/Time     : 2016:10:22 13:09:27-05:00
File Permissions                : rw-r--r--
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Description               :
Make                            : Canon
Camera Model Name               : Canon PowerShot ELPH 520 HS
Orientation                     : Horizontal (normal)
X Resolution                    : 180
Y Resolution                    : 180
Resolution Unit                 : inches
Modify Date                     : 2015:10:01 15:12:08
Y Cb Cr Positioning             : Co-sited
Exposure Time                   : 1/1250
F Number                        : 4.0
ISO                             : 100
Sensitivity Type                : Standard Output Sensitivity and Recommended Exposure Index
Exif Version                    : 0230
Date/Time Original              : 2015:10:01 15:12:08
Create Date                     : 2015:10:01 15:12:08
Components Configuration        : Y, Cb, Cr, -
Compressed Bits Per Pixel       : 3
Shutter Speed Value             : 1/1244
Aperture Value                  : 4.0
Max Aperture Value              : 4.0
Flash                           : Off, Did not fire
Focal Length                    : 6.5 mm
Macro Mode                      : Normal
Self Timer                      : Off
Quality                         : Fine
Canon Flash Mode                : Off
Continuous Drive                : Single
Focus Mode                      : Single
Record Mode                     : JPEG
Canon Image Size                : Small
Easy Mode                       : Manual
Digital Zoom                    : None
Contrast                        : Normal
Saturation                      : Normal
Sharpness                       : 0
Camera ISO                      : Auto
Metering Mode                   : Evaluative
Focus Range                     : Auto
AF Point                        : Face Detect
Canon Exposure Mode             : Program AE
Lens Type                       : Unknown (-1)
Max Focal Length                : 48 mm
Min Focal Length                : 4 mm
Focal Units                     : 1000/mm
Max Aperture                    : 4
Min Aperture                    : 8
Flash Bits                      : (none)
Focus Continuous                : Continuous
AE Setting                      : Normal AE
Image Stabilization             : On (2)
Zoom Source Width               : 3648
Zoom Target Width               : 3648
Spot Metering Mode              : Center
Manual Flash Output             : n/a
Auto ISO                        : 47
Base ISO                        : 200
Measured EV                     : 15.00
Target Aperture                 : 4
Target Exposure Time            : 1/1244
Exposure Compensation           : -1/3
White Balance                   : Auto
Slow Shutter                    : Off
Shot Number In Continuous Burst : 0
Optical Zoom Code               : 20
Flash Guide Number              : 0
Flash Exposure Compensation     : 0
Auto Exposure Bracketing        : Off
AEB Bracket Value               : 0
Control Mode                    : Camera Local Control
Focus Distance Upper            : 65.53 m
Focus Distance Lower            : 0 m
Bulb Duration                   : 0
Camera Type                     : Compact
Auto Rotate                     : None
ND Filter                       : Off
Self Timer 2                    : 0
Flash Output                    : 0
Canon Image Type                : IMG:PowerShot ELPH 520 HS JPEG
Canon Firmware Version          : Firmware Version 1.00
File Number                     : 111-2361
Camera Temperature              : 25 C
Canon Model ID                  : PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3
Thumbnail Image Valid Area      : 0 0 0 0
Date Stamp Mode                 : Off
My Color Mode                   : Off
Firmware Revision               : 1.00 rev 4.00
Categories                      : (none)
AF Area Mode                    : Single-point AF
Num AF Points                   : 9
Valid AF Points                 : 1
Canon Image Width               : 640
Canon Image Height              : 480
AF Image Width                  : 3648
AF Image Height                 : 2736
AF Area Widths                  : 446 9560 -20012 10492 0 9560 0 -25160 24060
AF Area Heights                 : 485 -20012 5140 0 4720 0 19 3599 574
AF Area X Positions             : 0 10492 4717 10812 1 -20028 1 10400 10492
AF Area Y Positions             : 0 4720 0 0 4720 -25184 0 5140 -20012
AF Points In Focus              : 0
Primary AF Point                : 0
Intelligent Contrast            : Off
Image Unique ID                 : a62e5858bde2af8e6af173924ca2d5fa
Faces Detected                  : 0
Time Zone                       : +01:00
Time Zone City                  : n/a
Daylight Savings                : Off
Aspect Ratio                    : 4:3
Cropped Image Width             : 640
Cropped Image Height            : 480
Cropped Image Left              : 0
Cropped Image Top               : 0
VRD Offset                      : 0
User Comment                    :
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 640
Exif Image Height               : 480
Interoperability Index          : R98 - DCF basic file (sRGB)
Interoperability Version        : 0100
Related Image Width             : 640
Related Image Height            : 480
Focal Plane X Resolution        : 3333.333333
Focal Plane Y Resolution        : 3333.333333
Focal Plane Resolution Unit     : inches
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Custom Rendered                 : Normal
Exposure Mode                   : Manual
Digital Zoom Ratio              : 1
Scene Capture Type              : Standard
Owner Name                      :
Compression                     : JPEG (old-style)
Thumbnail Offset                : 5632
Thumbnail Length                : 3825
Rating                          : 0
Image Width                     : 640
Image Height                    : 480
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
Aperture                        : 4.0
Drive Mode                      : Single-frame Shooting
Image Size                      : 640x480
Lens                            : 4.0 - 48.0 mm
Lens ID                         : Unknown 4-48mm
Scale Factor To 35 mm Equivalent: 7.1
Shooting Mode                   : Program AE
Shutter Speed                   : 1/1250
Thumbnail Image                 : (Binary data 3825 bytes, use -b option to extract)
Circle Of Confusion             : 0.004 mm
Field Of View                   : 42.6 deg
Focal Length                    : 6.5 mm (35 mm equivalent: 46.2 mm)
Hyperfocal Distance             : 2.50 m
Lens                            : 4.0 - 48.0 mm (35 mm equivalent: 28.4 - 340.7 mm)
Light Value                     : 14.3
    1 directories scanned
    1 image files read
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 22, 2016, 05:21:26 PM
Quote from: gczerw on October 22, 2016, 05:01:15 PM
exiftool -r '-FileName<IMG_${FileIndex}%c.%e' DIR

It uses FileIndex from EXIF information in file to rename to original filename

... but FileIndex was not available in the output you gave.  There was a FileNumber tag though:

exiftool -r '-filename<IMG${FileNumber;s/.*-//}%c.%e' DIR

Here I have removed the directory number from the start of FileNumber using the advanced formatting expression s/.*-//

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 22, 2016, 09:32:55 PM
Thanks for that, but I get the following:

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool "-filename<IMG${FileNumber;s/.*-//}%c.%e" .
    1 directories scanned
    1 image files updated

However the file has neither been renamed or moved elsewhere....
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 23, 2016, 09:04:38 AM
something was updated.  Add the -v3 option to get more details about what is happening.

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 23, 2016, 09:16:42 AM
I really don't understand why this is occurring....

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%%c.%%e" .
    1 directories scanned
    0 image files read

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

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

10/22/2016  04:46 PM    <DIR>          .
10/22/2016  04:46 PM    <DIR>          ..
10/01/2015  03:12 PM            85,694 dead.jpg
10/22/2016  04:01 PM         7,299,547 exiftool.exe
               2 File(s)      7,385,241 bytes
               2 Dir(s)  936,972,877,824 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 dead.jpg
File not found: dead.jpg

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 .\dead.jpg
File not found: ./dead.jpg

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 C:\Users\George\Downloads\testdisk-7.0\recover\new\dead.jpg
File not found: C:/Users/George/Downloads/testdisk-7.0/recover/new/dead.jpg
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 23, 2016, 10:20:39 AM
This could happen if there were an invisible character (eg. a space) in the file extension.  Otherwise, there is something funny that is wrong with your disk.  I would try typing this:

rename "dead<tab> test.jpg

(press the tab key to complete the name, then rename the file to something you know)

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 23, 2016, 10:33:25 AM
Okay, that worked.  Attached is the output of:

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 test1.jpg >exif.txt

It is too long to paste...
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 24, 2016, 07:59:24 AM
I don't know why you posted the output of that command.  I suggested adding -v3 to the command where you are trying to write FileName.  But it seems the problem is that there were invisible characters in the file name so ExifTool didn't process it.

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 24, 2016, 09:06:05 AM
Sorry, I misunderstood...

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%%c.%%e" .
======== ./test1.jpg
Setting new values from ./test1.jpg
Writing File:FileName
'./test1.jpg' --> './IMG2361%.%jpg'
    + FileName = './IMG2361%.%jpg'
    1 directories scanned
    1 image files updated

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

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

10/23/2016  10:27 AM    <DIR>          .
10/23/2016  10:27 AM    <DIR>          ..
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/01/2015  03:12 PM            85,694 test1.jpg
               3 File(s)      7,422,179 bytes
               2 Dir(s)  936,877,940,736 bytes free

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

File neither renamed nor moved anywhere!
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 24, 2016, 09:14:14 AM
I wonder if the "%" characters are causing a problem (although I am surprised that ExifTool didn't receive an error status when the rename failed).  You only need the doubled "%" characters in the argument to -d or in a .BAT file.  Try this:

exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%c.%e" .

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 24, 2016, 09:43:56 AM
No luck...but clearly something is amuck here!  Watch the sequence of events....

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%c.%e" .
    1 directories scanned
    0 image files read

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

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

10/23/2016  10:27 AM    <DIR>          .
10/23/2016  10:27 AM    <DIR>          ..
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/01/2015  03:12 PM            85,694 test1.jpg
               3 File(s)      7,422,179 bytes
               2 Dir(s)  936,846,929,920 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover\new>rename test1.jpg test2.jpg

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

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

10/24/2016  09:41 AM    <DIR>          .
10/24/2016  09:41 AM    <DIR>          ..
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/01/2015  03:12 PM            85,694 test2.jpg
               3 File(s)      7,422,179 bytes
               2 Dir(s)  936,859,758,592 bytes free

C:\Users\George\Downloads\testdisk-7.0\recover\new>exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%c.%e" .
======== ./test2.jpg
Setting new values from ./test2.jpg
Writing File:FileName
'./test2.jpg' --> './IMG2361.jpg'
    + FileName = './IMG2361.jpg'
    1 directories scanned
    1 image files updated

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

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

10/24/2016  09:41 AM    <DIR>          .
10/24/2016  09:41 AM    <DIR>          ..
10/23/2016  10:27 AM            36,938 exif.txt
10/22/2016  04:01 PM         7,299,547 exiftool.exe
10/01/2015  03:12 PM            85,694 test2.jpg
               3 File(s)      7,422,179 bytes
               2 Dir(s)  936,878,288,896 bytes free

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

Out of curiosity, I just did a chkdsk of the drive.  No errors found.
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 24, 2016, 11:30:03 AM
OK.  That should have worked.  I have never seen this specific problem before but try disabling your antivirus software to see if it is preventing ExifTool from renaming the file.  Also, you may try a simpler command and try a different file.  (eg. exiftool -filename=test2.txt test1.txt)

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 24, 2016, 04:50:55 PM
No change in behavior on Windows 10 desktop machine with antivirus shutdown.

However, out of curiousity, I took some files, went upstairs to the Windows 8.1 desktop machine and tried there...  SOME PROGRESS!

C:\Users\George\Downloads\new>exiftool -v3 "-filename<IMG${FileNumber;s/.*-//}%c.%e" .
======== ./dead.jpg
Setting new values from ./dead.jpg
Writing File:FileName
'./dead.jpg' --> './IMG2361.jpg'
    + FileName = './IMG2361.jpg'
    1 directories scanned
    1 image files updated

C:\Users\George\Downloads\new>dir
Volume in drive C has no label.
Volume Serial Number is B4FC-9759

Directory of C:\Users\George\Downloads\new

10/24/2016  05:55 PM    <DIR>          .
10/24/2016  05:55 PM    <DIR>          ..
10/01/2015  03:12 PM            85,694 IMG2361.jpg
10/24/2016  05:29 PM         7,299,547 exiftool.exe
10/24/2016  05:55 PM    <DIR>          fixed
               2 File(s)      7,385,241 bytes
               3 Dir(s)  227,520,618,496 bytes free


C:\Users\George\Downloads\new>exiftool -v3 "-filename<IMG${FileNumber}%c.%e" .
======== ./dead.jpg
Setting new values from ./dead.jpg
Writing File:FileName
'./dead.jpg' --> './IMG111-2361.jpg'
    + FileName = './IMG111-2361.jpg'
    1 directories scanned
    1 image files updated

C:\Users\George\Downloads\new>dir
Volume in drive C has no label.
Volume Serial Number is B4FC-9759

Directory of C:\Users\George\Downloads\new

10/24/2016  05:55 PM    <DIR>          .
10/24/2016  05:55 PM    <DIR>          ..
10/01/2015  03:12 PM            85,694 IMG111-2361.jpg
10/24/2016  05:29 PM         7,299,547 exiftool.exe
10/24/2016  05:55 PM    <DIR>          fixed
               2 File(s)      7,385,241 bytes
               3 Dir(s)  227,520,618,496 bytes free

Interesting that I'm getting results on the Windows 8.1 machine.  The filenames were changed in the current directory.  However but no appropriate Canon numbered directories were created and no files were moved.

Canon DCIM directory nomenclature is, for example 111_10, and filename nomenclature is IMG_xxxx.jpg.  So how should I proceed to get those results?
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 24, 2016, 08:07:34 PM
Did you try turning off Windows Defender on the Windows 10 machine?

To also set the directory to ###_## as you described, you could do this:

exiftool "-filename<${FileNumber;tr/-/_/;$_=substr($_,0,6)}/IMG${FileNumber;s/.*-//}%c.%e" .

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 24, 2016, 08:42:34 PM
1.  Defender was off on the Windows 10 machine.

2.  That command did NOTHING on the Windows 8.1 machine (defender also off on it).  But it says that it did!!!  I can't find that new directory or file anywhere!

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Users\George>cd Downloads/new

C:\Users\George\Downloads\new>exiftool -v3 "-filename<${FileNumber;tr/-/_/;$_=substr($_,0,6)}/IMG${FileNumber;s/.*-//}%c.%e" .
======== ./dead.jpg
Setting new values from ./dead.jpg
Writing File:FileName
'./dead.jpg' --> '111_23/IMG2361.jpg'
Created directory 111_23
    + FileName = '111_23/IMG2361.jpg'
    1 directories scanned
    1 directories created
    1 image files updated

C:\Users\George\Downloads\new>dir
Volume in drive C has no label.
Volume Serial Number is B4FC-9759

Directory of C:\Users\George\Downloads\new

10/24/2016  08:25 PM    <DIR>          .
10/24/2016  08:25 PM    <DIR>          ..
10/01/2015  03:12 PM            85,694 dead.jpg
10/24/2016  05:29 PM         7,299,547 exiftool.exe
10/24/2016  08:25 PM    <DIR>          fixed
               2 File(s)      7,385,241 bytes
               3 Dir(s)  225,855,995,904 bytes free

This is weird!!!
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Hayo Baan on October 25, 2016, 12:58:04 AM
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).
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 25, 2016, 09:50:55 AM
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.
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 25, 2016, 11:21:09 AM
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
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 26, 2016, 12:32:29 PM
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.
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 26, 2016, 12:48:43 PM
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
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 26, 2016, 09:14:58 PM
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.
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 27, 2016, 10:07:14 AM
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
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 27, 2016, 12:12:45 PM

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>
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 27, 2016, 12:15:41 PM
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
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 27, 2016, 03:30:35 PM
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>
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 27, 2016, 03:48:26 PM
Can exiftool read test2.jpg?

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 27, 2016, 04:33:09 PM
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
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 28, 2016, 07:22:51 AM
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 (https://blogs.technet.microsoft.com/josebda/2012/11/13/windows-server-2012-file-server-tip-disable-8-3-naming-and-strip-those-short-names-too/) 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 (https://msdn.microsoft.com/en-us/library/cc615012(v=bts.10).aspx)).

- Phil
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: gczerw on October 28, 2016, 09:34:21 AM

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>
Title: Re: How to rename recovered .jpg files to original Canon names in windows 10?
Post by: Phil Harvey on October 28, 2016, 09:45:56 AM
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