I'm trying to make a file that will back up my files to a directory when I wish for it to (I'm experimenting).
from infi.systray import SysTrayIcon
import time
import shutil
def backup(systray):
newPath = shutil.copy(r"D:\Desktop\Random Ass Videos", 'D:\Desktop\Backup File')
menu_options = (("Backup", None, backup),)
systray = SysTrayIcon("RoseBackups.ico", "Rose Backup Tool", menu_options)
systray.start()
here is the code above ^^^
but when I run it I get the error:
PermissionError: [Errno 13] Permission denied: 'D:\\Desktop\\Random Ass Videos'
I thought it was because the file wasn't run as admin so I tried to add:
from infi.systray import SysTrayIcon
import time
import shutil
import admin
if not admin.isUserAdmin():
admin.runAsAdmin()
but I got a problem as it couldn't find a module named 'admin' (I'm sure this is 100% my fault as I probably didn't install it correctly)
Any help counts, thanks all!