I am trying to convert a long filename to a short filename (8.3) on Windows.
A batch-file with a command line argument works as intended:
short.bat:
cmd /c for %A in ("C:\Documents and Settings\User\NTUSER.DAT") do @echo %~sA