Simple and working function to copy any file to clipboard using Python

 def copyToClipboard(file_path):

    import os
    fullpath = "C:\\Users\\Lenovo\\Desktop\\Automations\\" + file_path
    os.system(f'powershell Set-Clipboard -Path {fullpath}')

Comments

Popular posts from this blog

Apple iPad Air (2022) Specifications and Review in 2023

17-year-old suspect in fatal stabbing at Taylor Swift-themed dance event ID’d

Exercise vs Diet