I\'m using Python on Windows and I want a part of my script to copy a file from a certain directory (I know its path) to the Desktop.
I used this:
sh
On Unix or Linux:
import os desktop = os.path.join(os.path.join(os.path.expanduser('~')), 'Desktop')
on Windows:
import os desktop = os.path.join(os.path.join(os.environ['USERPROFILE']), 'Desktop')
and to add in your command:
shutil.copy(txtName, desktop)