Reputation: 1482
I have files that cannot be renamed without white spaces (work files). The file name is Evo PROG6001 FSJD0250240 E.PART
stored in a variable file
. If I run os.system('start ' "'" + file + "'")
it only recognizes the word Evo
and returns Windows cannot find "Evo". Make sure you types the name correctly, and then try again
. The same thing occurs with os.system('start ' + file)
.
Is there a way to do this?
Upvotes: 0
Views: 1377
Reputation: 1482
I needed to use os.startfile()
and also point it to the root directory, which I had stored previously.
os.startfile(new_folder + '\\' + file)
works
Upvotes: 2