Apr-28-2023, 05:21 PM
Hi Guys
This may be a really simple issue which has stumped me.
The "FPath" variable has two back slashes at the end.
In the current setup the code will run, however with the double backslash the file path is invalid.
Using one backslash at the end does not work as errors are developed
The "FName" variable will be defined from a spreadsheet, however below I have just assigned it a name for the sake of this post.
How can I set up the code so that the file path will be valid?
This may be a really simple issue which has stumped me.
The "FPath" variable has two back slashes at the end.
In the current setup the code will run, however with the double backslash the file path is invalid.
Using one backslash at the end does not work as errors are developed
The "FName" variable will be defined from a spreadsheet, however below I have just assigned it a name for the sake of this post.
How can I set up the code so that the file path will be valid?
FPath = r"C:\Users\mishal.mohanlal\Desktop\\" FName = "Structure1.STD" F = FPath+FName print(F)