import os
os.startfile('C:\\Some Location\\file.file')
When I am trying to run the above code the code gives an error as follows:- FileNotFoundError: [WinError 2] The system cannot find the file specified
While for the same location this code works perfectly for files with '.txt' extension. For eg,
import os
os.startfile('C:\\Some Location\\file.txt')
This runs perfectly and opens the file.
Please help me solve this issue, I think I am using the wrong extension for the file. The type of file is 'File'.