Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Wed, 3 Jul 2002 22:37:33 +0300 From: Ville Herva To: cygwin AT cygwin DOT com Subject: Re: dir \\.\c:\ Message-ID: <20020703193732.GL9092@niksula.cs.hut.fi> References: <01e501c22294$fecd8060$0100a8c0 AT advent02> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i On Wed, Jul 03, 2002 at 11:59:51AM -0400, you [Bernard A Badger] wrote: > > So what _is_ it? It doesn't seem like a legitimate UNC name. > It doesn't match \\Host\share\dir\dir2\. > dir \\%COMPUTERNAME%\c:\ doesn't work either. > > (Sorry if this is too OT.) It is a way to access cumbersome filenames such as "aux", "prn", "com", "lpt1" and filenames with more than MAX_PATH characters in them. (I think typed the prefix wrong in the previous mail - it should be "\\?\". "\\.\" is prefix for the NT device names such as "\\.\PhysicalDrive0"). FindFirstFile() documentation: "Windows NT/2000: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path." and file naming conventions in MSDN: "The Unicode versions of several functions permit paths that exceed the MAX_PATH length if the path has the "\\?\" prefix. The "\\?\" tells the function to turn off path parsing. However, each component in the path cannot be more than MAX_PATH characters long. Use the "\\?\" prefix with paths for local storage devices and the "\\?\UNC\" prefix with paths having the Universal Naming Convention (UNC) format. The "\\?\" is ignored as part of the path. For example, "\\?\C:\myworld\private" is seen as "C:\myworld\private", and "\\?\UNC\bill_g_1\hotstuff\coolapps" is seen as "\\bill_g_1\hotstuff\coolapps". " (Yes, the bill_g example is actually Microsoft's :) In addition, you can propably find a KB article talking about nasty filenames ("com", "aux" etc) and how to get rid of them. Since "\\?\" prefix turns of path parsing, you can access them with the prefix. -- v -- v AT iki DOT fi -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/