Wildcards in Windows

I put forth the challenge in my last post about how to match files that start, end, or simply have a period in them. It isn’t easy to do. Wildcards in paths seem simple at first. You have ‘?’ to match any single character and ‘*’ to match zero or more of any characters. Matching…

0

Wildcard challenge

Finding files with spaces from a command prompt might not be immediately obvious. Using quotes is the answer. List all files with a space: dir “* *” List all files that start with a space: dir ” *” List all files that end with a space: ??? #3 is a bit more challenging. Normalization has something…

0

DOS to NT: A Path’s Journey

Overview Most of us are familiar with DOS style paths to files such as C:\bar\foo.txt. Most aren’t familiar with the DOS Device format of said path: \\.\C:\bar\foo.txt. Even less know about the lowest level version of this path- the “real” NT path to the file object that Windows uses internally: \Device\HarddiskVolume4\bar\foo.txt. Knowing how paths resolve through the…

6

Path Normalization

Here is part two of my discussion on Windows paths- the normalization of paths. See the first post at Path Format Overview. Important: Some things I discuss aren’t explicitly or centrally documented. While you can discover these details by thorough searching and experimentation, be very cautious of second guessing Windows APIs. If you need functionality a…

0

Path Format Overview

As promised, here is the start of the look into paths on Windows. I’ll keep things simple at first and layer on complexity in additional posts. In this post we’ll look at a top level overview of the path formats in use in Windows. DOS Paths Let’s start with the DOS path format that has…

4