axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Windows space in directory/file names


From: Tim Daly Jr.
Subject: Re: [Axiom-developer] Windows space in directory/file names
Date: 13 Jan 2005 16:40:44 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

William Sit <address@hidden> writes:

...
> 
> Regarding spaces in directories or files, in URL's they use %20 (20h
> is ascii for space). Can something like that be done for files and
> directories? I admit that is ugly though.
> 
> William

The windows sdk function GetShortPathName() will give you the standard
8.3 path that corresponds to a long path.  I don't know if the 'short
path' is explicitly not allowed to contain spaces, but it usually
won't.  In my MinGW environment, I use a little utility I wrote for
shortening paths based on this function.  If you say 

    shortpath c:/program files/

it says

    c:/PROGA~1/

Those paths can be used interchangeably, so you can just have programs
that don't understand spaces in paths use the latter.  I've attached
the utility.  gcc shouldn't need any special flags to compile it in
MinGW.  Maybe you guys can cannibalize it for axiom.

Attachment: shortpath.c
Description: shortpath utility


-- 
-Tim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]