Python beginner here.
I am developing a little python script which is copying files from the PC to a USB.
Now. The .py file is in the "MyPythonScript" folder and it should copy files in that directory to the usb. and my Script looks something like this.
username = getpass.getuser()
src = 'C:/Users/' + username + '/Desktop/MyPythonScript/testfolder/sometext.txt
dst = 'F:'
shutil.copy(src, dst)
It works perfectly fine, but it assumes that the Folder name is MyPythonScript and it's located on the Desktop. What do I need to do to get the data right out of the folder where the python script is located? So it doesn't matter if it is in Desktop, Downloads, or anywhere on another hard drive.