Answers for "get desktop location python"

0

python get desktop directory

You can use os.environ["HOMEPATH"] to get the path. Right now it's literally trying to find %HOMEPATH%/Desktop without substituting the actual path.

Maybe something like:

shutil.copy(txtName, os.path.join(os.environ["HOMEPATH"], "Desktop"))
Posted by: Guest on March-25-2021
0

get desktop location python

os.path.join(os.environ["HOMEPATH"], "Desktop")
Posted by: Guest on January-30-2022

Python Answers by Framework

Browse Popular Code Answers by Language