Odd Wildcard Matching in Windows 10

I recently ran into an odd behavior of more files matching a pattern than I expected. I’d used exiftool to modify the dates on files my GoPro produced. It creates backup files of the original images when it modifies the tags. Here’s the command I ran.

exiftool.exe -r "-AllDates+=4:7:6 17:40:00" -ext jpg f:\GoPro\20170807

Now I had about 4000 files with the .JPG extension and another 4000 files with a .JPG_original extension.

I ran my program that parses the directory structure and turns all those images into a time lapse movie, and it seemed to be including both the file extensions, making a very disjointed movie.

I loaded my source code in the debugger and it seemed to be doing a findfirst / findnext specifically looking for .JPG files, and not some other extension, but it was definitely retrieving files both with .JPG and .JPG_original extensions.

I then ran a couple of commands at the windows command prompt and was surprised to find the same results there.

dir F:\GoPro\20170807\372GOPRO\G*.JPG /p
dir F:\GoPro\20170807\372GOPRO\G???????.JPG /p

Each command returned both the JPG and JPG_original files.

dir F:\GoPro\20170807\372GOPRO\G*.JPG_original /p

returned just the JPG_original files.

dir F:\GoPro\20170807\372GOPRO\G??????.JPG /p

had one less question mark and correctly returned no files.

This is all unexpected behavior, though I’m glad to see that it was consistent with the operating system and not something specific to the C runtime. I’d love an explanation of what’s going on.

Tiananmen Square 25th Anniversary and Right To Be Forgotten

I find it extremely interesting on this the 25th anniversary of the suppression of Tianamen Square Protests that Europeans are trying to implement the Right to be forgotten.

tiananmen-square-1989-tank-man-china-close-up

25 years ago I had just started working at Microsoft and was using the internet to communicate inexpensively with friends still attending university. I had a screen on my desk that could run 640×480 resolution. I remember seeing the image of a solitary man stopping a line of tanks displayed on screens around the office. I was graduating college, the cold war was ending, and students were demonstrating for democracy in China. What could be better.

This morning on the radio I was hearing about how most of the young in China didn’t know the recent history of demonstrations in Tiananmen Square, and thinking of the irony that Europe is trying to make the right to be forgotten law enforceable. If the knowledge of what the Nazis did had been forgotten by 1970, where would Europe be now?