'Python how to copy directory/file with different username

I need to copy different files or directories to my USB device on a different computer, each computer has a different session name example :

Computer 1 = toto Computer 2 = titi Computer 3 = qwerty

on a common folder which will contain several sub-files... I've found how to obtain the current session name Windows

import getpass 
username = getpass.getuser() 
print(username)

The question :

how do automatically retrieve the session names and copy files to the desired location? with a fonction

Thank you



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source