[Tutor] SYS Long File Names?
davea at ieee.org
Mon Feb 8 01:09:21 CET 2010
> I was looking at the sys.argv(1) file name and it is the short 8 char
> name. How do you place it into the long file name format? I was reading
> music files and comparing the name to the directory listing and always comes
> back as not found because the name was shortened.
> So, how do you get it to read long file names?
You need square brackets, not parentheses on the sys.argv. But I'm
guessing that's a typo in your message.
Some more information, please. What version of Python, and what OS ?
And how are you running this script? If you're typing the script name
at a DOS box, then the string you're seeing in sys.argv is the one
you typed on the command line.
If you start it some other way, please tell us how.
More information about the Tutor