Dammit...I thought I'd tried that combination of string in string earlier..... Obviously that was one permutation I missed!
Hang on....Looking back at my failed scripts from when I was playing around, I had the " and the ' the wrong way around! Damn these fat drummer fingers! grrr! heh heh!
Thanks for that Ene! Yes that's far better than my solution!
just thinking... wouldnt it have made more sense to just change "Program files" to "Program_files" or something similar?
Not really, because in MS Windows the 'Program Files' folder is the system default folder for programs to be installed in (and there are usually a lot of programs installed there!).
Simply renaming the 'Program Files' folder to 'Program_Files' would cause most (if not all) of your programs to either malfunction, or not work at all when you tried to run them.
The OS probably wouldn't take it too well either!
Plus any shortcuts you have for any programs in the 'Program Files' folder will also stop working...(e.g. desktop shortcuts and start menu links)
So in this case...No! Changing the folder name would definitely not be the best option. Ene's line of code is by far the best solution to the problem!
Re: opening an exe from Program Files directory in windows
Something only Microsoft could dream up. I understand that in the European version of Windows the space is avoided. The kludge itself is from a programmer within Microsoft.
Re: opening an exe from Program Files directory in windows
Its actually not as tough as people are making it out to be, if you have a space you need to put ' ' or " " around it to clarify that it has a space, maybe try this:
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Previous Thread in Python Forum Timeline:Text Files