Python Copying File and Directories

From rbachwiki
Revision as of 17:16, 29 June 2022 by Bacchas (talk | contribs) (Created page with "= Copying a single file= import shutil src_path = r"C:/Users/bacchas/Dropbox (Personal)/Filing Cabinet/Karaoke Stuff/newsongscode.txt" dst_path = r"C:/Users/bacchas/Dropbox (Personal)/All Folders/websites/linode_msites/rb222/newsongscode.txt" shutil.copy(src_path, dst_path) print('copied')")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Copying a single file

import shutil

src_path = r"C:/Users/bacchas/Dropbox (Personal)/Filing Cabinet/Karaoke Stuff/newsongscode.txt"
dst_path = r"C:/Users/bacchas/Dropbox (Personal)/All 
Folders/websites/linode_msites/rb222/newsongscode.txt"
shutil.copy(src_path, dst_path)
print('copied')