Launcher, and ftype Python.File

eryksun eryksun at gmail.com
Wed Nov 18 13:03:51 EST 2015


On Wed, Nov 18, 2015 at 8:45 AM, Christian Ullrich <chris at chrullrich.net> wrote:
> Apparently %L is always the long file name, and %1 is the short name unless
> the shell can prove that the executable can handle long names.

Specifically old Win16 programs (identified by the file header) aren't
aware of long filenames. In the case of these old programs, the shell
calls GetShortPathName when replacing %0 or %1, but not when replacing
%L.

For Win32 programs %0, %1, and %L are all the same:

    C:\Temp>ftype Python.File
    Python.File="C:\Windows\py.exe" "%0" "%1" "%L" %*

    C:\Temp>longfilename.py
    sys.argv:
    C:\Temp\longfilename.py
    C:\Temp\longfilename.py
    C:\Temp\longfilename.py

    Short Pathname:
    C:\Temp\LONGFI~1.PY



More information about the Python-list mailing list