37559Re: wish return DOS (short) form of NAME
- Mar 3, 2003Bram>Is there always a short name? E.g., on NTFS file systems.
I believe so.
From google, I searched "dos short name tip", and found a good one.
It is for win95, but I believe all windows OSes shares the same convention,
and every filename for windows has a one-to-one match to DOS short name.
Also, from cygwin, I can have filename using cygpath: such as
Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-c HANDLE] [-f FILE] [options] NAME
Output type options:
-d, --dos print DOS (short) form of NAME (C:\PROGRA~1\)
-m, --mixed like --windows, but with regular slashes (C:/WINNT)
-u, --unix (default) print Unix form of NAME
-w, --windows print Windows form of NAME (C:\WINNT)
-t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or
Path conversion options:
-a, --absolute output absolute path
-l, --long-name print Windows long form of NAME (with -w, -m only)
-p, --path NAME is a PATH list (i.e., '/bin:/usr/bin')
-s, --short-name print DOS (short) form of NAME (with -w, -m only)
-A, --allusers use `All Users' instead of current user for -D, -P
-D, --desktop output `Desktop' directory and exit
-H, --homeroot output `Profiles' directory (home root) and exit
-P, --smprograms output Start Menu `Programs' directory and exit
-S, --sysdir output system directory and exit
-W, --windir output `Windows' directory and exit
>From: Bram Moolenaar <Bram@...>_________________________________________________________________
>To: "Xiangjiang Ma" <maxiangjiang@...>
>Subject: Re: wish return DOS (short) form of NAME
>Date: Mon, 03 Mar 2003 10:27:56 +0100
>Xiangjiang Ma wrote:
> > For vim for win32, can we have an option to return DOS filename?
> > How about %:P, %:P:H, etc (captital letter)?
> > Reason: for those poor Windows users, :set ssl<CR> helps a lot.
> > But space in the filename is a constant trouble. Recently, after
> > using gvim.exe 6.1.358, I found my following favorite map is broken:
> > nme <silent>PopUp.Open_IE_&View :norm :sil! !start
> > C:/Progra~1/intern~1/iexplore -nohome "%:p"<CR>
>Is there always a short name? E.g., on NTFS file systems.
>If corn oil comes from corn, where does baby oil come from?
> /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net
>/// Creator of Vim - Vi IMproved -- http://www.Vim.org
>\\\ Project leader for A-A-P -- http://www.A-A-P.org
> \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html
Tired of spam? Get advanced junk mail protection with MSN 8.
- << Previous post in topic Next post in topic >>