On Wed, Nov 18, 2015 at 8:45 AM, Christian Ullrich <ch...@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 -- https://mail.python.org/mailman/listinfo/python-list