I am very new to Python. I am curious to how I would be able to copy some files from my directory to another Users directory on my computer using python script? And would I be correct in saying I need to check the permissions of the users and files? So my question is how do I send files and also check the permissions at the same time
shutil is a very usefull thing to use when copying files.
I once needed to have a python script that moved all .mp3 files from a directory to a backup, deleted the original directory, created a new once, and moved the .mp3 files back in. shutil was perfect for thise.
The formatting for the command is how @Kieran has stated earlier.
If you're looking to keep file metadata, then use shutil.copy2(src, dest), as that is the equivalent of running copy() and copystat() one after another.
Python sending files from a user directory to another user directory