Advice from someone who does not know everything.

Category: Techie Stuff (Page 2 of 2)

Fixing Photo Dates and Renaming Files With JHead

I found the most useful picture EXIF tool the other day. It is called JHead. Basically, it allows you to mass change photo files and fix the dates, rename the files based on the dates, and perform other functions.

The reason I needed it was that I was recently on a trip. There were 4 of us. We had 2 Nikon cameras, 2 Canon cameras, and we were all set to the wrong time as we were in another country and messed up our camera settings.

File Naming With Nikon Vs. Canon

One of the big annoyances I found with the Nikon and Canon software is when they import, I couldn’t get them to the same naming convention.

I am used to Nikon’s import where I can set it to use the format YYYY-MM-DD_HH-MM-SS.JPG. This is the full date and time the photo was taken. Because of the order of the numbers, these pictures will sort by name in the right order they were taken. It works great.

Unfortunately, Canon software won’t let you have this same format. Therefore, if you put all the files into the same folder, they won’t sort properly. One exception is if you have Windows XP, you can sort by the actual Date Taken EXIF property. If you are using 3rd party software or an older computer this is useless though.

Renaming Files With JHead

This is an awesome feature. Basically, you just need to download the Windows executable JHead and save it somewhere (preferably where all your photos are stored).

Open up a command prompt (Start -> Run -> type cmd -> Click OK). You should have a black window. Navigate to the folder your pictures are stored in.

Then you can rename them using jhead and the -n switch. Use the JHead instructions to help figure it out.

For example, I renamed my files so they looked like this:

2008-07-29_15-34-23_ng.jpg

This represents the exact date I took the picture and appends my initials in there as well. This is the command to rename the files like that:

jhead -n%Y-%m-%d_%H-%M-%S_ng *.jpg

Fixing the Picture Dates

If your camera had the wrong date set for whatever reason (in another time zone, daylight savings, clock reset), then you can also fix the dates by applying an offset.

JHead has two switches to do this. One is by specifying how many hours it is out and the other is by specifying how many years, months, or days it is out.

Note: Please test this out on a copy of one file before applying it to all of them to see if you get the desired effect.

There are a number of good examples in the JHead instructions as well.

For myself, one camera was out by a month and the other was out by 12 hours so I used the following switches:

Roll forward a month (camera was at May 30th when it should have been June 30th).

jhead -da2008:05:30-2008:06:30 *.jpg

Roll forward 12 hours.

jhead -dt+12 *.jpg

Conclusion

So after adjusting all my times to be correct, I then set the file names for all my pictures and included the initials at the end of who took the photos. It is ten times easier to look through them now and know where they came from.

Keep in mind, a good practice would be to have everyone in a group take a photo at the exact time at the beginning or end of your trip. You could then look at the times for all those photos and if some cameras were offset by a couple minutes, you would be able to adjust them back so the pictures are perfectly aligned.

Escaping The Asterisk (*) in Excel

I had a formula the other day that needed to see if an asterisk – * was present in a cell. So the formula included a comparison for “*” in the syntax. Anyhow, turns out some formulas (not all) will treat the * as a wildcard and match it to any number of letters or numbers. If you are a programmer, like myself, then you are used to escaping letters with a backslash (\). However, Excel does not use this and the proper escape is a tilde (~).

I was a bit surprised how difficult searching the internet for this solution was, so I’m posting it here too. Hopefully I have good enough keywords and explanation that it will be easier for others like me to find.

So my formula that was giving me issues was a SUMIF. It looked like this:

=SUMIF(A1:A500,"=*",B1:B500)

My intention was to add up all the B column values that had a * in the A column, however it was adding up all the B column fields regardless. Once I changed it to the formula below, it worked just fine.=SUMIF(A1:A500,"=~*",B1:B500)

Blu-Ray Player Not Working – Lenovo A720 – Solution

I went to use my Blu-Ray player to load on my recently purchased Lenovo A720 all-in-one PC and found it not working. It is running Windows 8.

I opened the Device Manager from the Control Panel and the Blu-Ray player was showing with a yellow warning sign in the device lists. The name of the device was PLDS DS-6E2SH BD-COMBO.

When I double clicked and examined the device, the exact error message was:

“Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19)”

I tried uninstalling and re-installing the device using the automatically discovered drivers (with and without rebooting). I tried to update the drivers as well, but still had no luck.

Solution That Worked For Me

I searched around and found a variety of possible solutions, but only one I could get working.

  • Open the registry editor. Press WindowsKey + R or search for the Run app. Then type regedit and hit Enter.
  • Naviate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}
  • Double click on the key “UpperFilters”
  • Delete whatever value it has for it and then exit out of registry editor.
  • Go into the Device Manager (Control Panel) and uninstall the device.
  • Click “Search for New Hardware” and let it re-install the device.

References to Other Potential Solutions

Newer posts »