P
Patrick L. Nolan
Our python script uses popen to run an application on Windows XP.
The application chokes if the filename given as a command line
argument contains any spaces. It's happy with the 8.3 shortname
notation, though. So given a file with a name like
c:\Documents and Settings\Joe User\Desktop\My Files\foo.dat
I would like to be able to convert this to
c:\DOCUME~1\JOEUSE~1\Desktop\MYFILE~1\foo.dat
This would be a fairly simple exercise in text manipulation
except that the number may not always be 1. If the directory
names are not unique in the first 6 characters, there may
be ~2 etc.
Has this been solved by someone else?
The application chokes if the filename given as a command line
argument contains any spaces. It's happy with the 8.3 shortname
notation, though. So given a file with a name like
c:\Documents and Settings\Joe User\Desktop\My Files\foo.dat
I would like to be able to convert this to
c:\DOCUME~1\JOEUSE~1\Desktop\MYFILE~1\foo.dat
This would be a fairly simple exercise in text manipulation
except that the number may not always be 1. If the directory
names are not unique in the first 6 characters, there may
be ~2 etc.
Has this been solved by someone else?