Loading ...
Sorry, an error occurred while loading the content.

37559Re: wish return DOS (short) form of NAME

Expand Messages
  • Xiangjiang Ma
    Mar 3 9:02 AM
    • 0 Attachment
      Bram>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.
      http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/html/msdn_msdn207.asp

      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
      cygpath [-ADHPSW]
      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
      (/cygdrive/c/winnt)
      -w, --windows print Windows form of NAME (C:\WINNT)
      -t, --type TYPE print TYPE form: 'dos', 'mixed', 'unix', or
      'windows'
      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)
      System information:
      -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


      --
      Xiangjiang Ma

      >From: Bram Moolenaar <Bram@...>
      >To: "Xiangjiang Ma" <maxiangjiang@...>
      >CC: vim@...
      >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.
      http://join.msn.com/?page=features/junkmail
    • Show all 6 messages in this topic