Set the windows clipboard to the short name of the specified file. Useful for talking to legacy apps on Windows.
use Win32::Clipboard; use Win32::AbsPath qw(Relative2Absolute); -e $ARGV[0] and print Win32::Clipboard ( Win32::GetShortPathName Relative2Absolute $ARGV[0] ) -> GetText() or print "File name?";

Replies are listed 'Best First'.
Re: win32 short file name
by EdwardG (Vicar) on Mar 02, 2004 at 17:33 UTC

    I should point out that

    Win32::GetShortPathName

    is a [CORE] builtin function of ActivePerl and does therefore not need use Win32.

    See ActiveState for docs

      ActivePerl is not the only perl on windows which is why it doesn't matter if it's CORE to ActivePerl (you should stop pointing that out).