valid filenames

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

valid filenames

Post by *compie »

Tip for Christian :)

If you are writing a Win32-based program that manages arbitrary files, consider prepending "\\?\" to the start of file names before you call CreateFile( ), DeleteFile( ), RenameFile( ), etc. This escape sequence at the start of a file name instructs the Win32 subsystem to bypass its normal name checking functions, and you will be able to use any valid NTFS name from your Win32 program.

http://blogs.msdn.com/brian_dewey/archive/2004/01/19/60263.aspx

That would be a nice thing to have in Total Commander I think.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately this only works
- on Windows NT based systems
- with the Unicode functions
and doesn't handle things like \.\ which the user may have entered.
Author of Total Commander
https://www.ghisler.com
Post Reply