Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

No. Not a relative path :)

The correct term is "short names". Example

P:\test>dir /x "d:\Program*" Volume in drive D is Winnt Volume Serial Number is D822-5AE5 Directory of d:\ 19/07/03 06:29 <DIR> PROGRA~1 Program Files 1 File(s) 0 bytes 1,153,617,920 bytes free

Here the full (or long) name of the directory is "Program files". The short name is "PROGRA~1".

This was the hack MS introduced to allow Dos/Win95 programs that were written expecting the old 8.3 filename format to continue to work once they introduced the long filenames that could include spaces & other 'funny characters' and multiple .s etc. Mostly I had forgotten they still existed, but for some reason, when you use the "%1" syntax as I described above, you get the short form rather than the long one.

For many things, rename, open, opendir etc. these work just fine, but if you were trying to match file or directory names that followed some pattern then you aren't going to get the expected result when you get given a shortened form.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

In reply to Re: Re: Re: Re: (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows by BrowserUk
in thread (Not Quite Perl) Running Scripts from Right-Click Context Menu in Windows by svsingh

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (2)
    As of 2018-05-27 13:02 GMT
    Find Nodes?
      Voting Booth?