whitespaces in the path of windows filepath

后端 未结 4 947
闹比i
闹比i 2020-11-30 04:13

I am working on file operations using python.

I have a filepath as :

filepath = \"E:/ABC/SEM 2/testfiles/all.txt\"

when I am op

4条回答
  •  一整个雨季
    2020-11-30 04:29

    Try putting double quotes in your filepath variable

    "\"E:/ABC/SEM 2/testfiles/all.txt\""
    

    Check the permissions of the file or in any case consider renaming the folder to remove the space

提交回复
热议问题