laurent
laurent

Reputation: 90804

What does "\\?\" means before a path?

I'm having a look at the code of FastCopy, where I want to add a few features.

Internally, it seems that FastCopy stores its paths with a \\?\ before the path. eg. \\?\c:\Program Files\Adobe. These paths are passed on directly to Windows API functions like DeleteFile, RemoveDirectory, etc. so it seems Windows understands the format.

But what do these extra characters mean and why do FastCopy stores them that way?

Upvotes: 2

Views: 501

Answers (3)

Graham Perks
Graham Perks

Reputation: 23398

Generally that means it's supporting long file names - names up to about 32K in length.

It can also be used to specify UNC paths, e.g. \\?\UNC\server\share.

Without that support Fastcopy wouldn't be able to access all files properly.

More detail at http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

Upvotes: 2

Jerry Coffin
Jerry Coffin

Reputation: 490328

The thing that's probably most relevant for FastCopy is that it allows you to work with file names more than ~256 characters long.

If memory serves, it also prevents Windows from parsing a file name looking for things like \\server\file to access a shared file (though you can still use \\?\UNC\whatever), but that's probably not what's really intended/relevant here.

Upvotes: 3

Specksynder
Specksynder

Reputation: 843

You are referring to Long UNC paths : https://en.wikipedia.org/wiki/Path_%28computing%29 Hope that helps.

Upvotes: 2

Related Questions