question

HeHaiYun-5343 avatar image
0 Votes"
HeHaiYun-5343 asked HeHaiYun-5343 commented

How to get file address in onedrive environment?

I want to get a file path by python.

My file is in C:\Users\user1\OneDrive\Desktop\Python\test.py

when I using below code , the result is 'C:\Users\user1', cannot get the real path of the file

import os
apath=os.getcwd()
print(apath)

C:\Users\user1

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NonkiTakahashi avatar image
0 Votes"
NonkiTakahashi answered HeHaiYun-5343 commented

Hi @HeHaiYun-5343, this tag small-basic-featured-program is for Small Basic programming language, not python... I recommend you to add the not-supported tag or an appropriate tag. Thanks. By the way, are you using Visual Studio?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your reminding and reply.
And do you mean VS code? if it is, then yes.

0 Votes 0 ·