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.

Advertisements

85% Processor Usage while idle

My Microsoft Surface Pro 4 has recently started showing high CPU usage even while I’ve got nothing running in the foreground.

It’s annoying because I’m used to the idea of lower CPU usage being related to extended battery life, and if the CPU is being used by an unnecessary program, I’ll stop using that program.

2016-05-15 (1)

The other interesting thing is that Microsoft Edge is showing as a significant user of both CPU and Memory. I’ve not yet launched Microsoft Edge since I told the operating system to restart.

Is this some placeholder in the Task Manager?

If I run the Sysinternals Process Explorer side by side, it shows the machine being very lightly used, which is closer to what I expect to see from task manager. If I want real information on what’s going on with my computer I’m more likely to use the Sysinternals tool, but the task manager is already installed on all windows machines, and has some simple graphs to look at, including watching network traffic.

2016-05-15 (2)