File and directory Paths - Python Cheatsheet

PHOTO EMBED

Sun Sep 24 2023 02:10:51 GMT+0000 (Coordinated Universal Time)

Saved by @OperationsBGSC #python

>>> import shutil, os

>>> os.chdir('C:\\')
>>> shutil.copy('C:\\spam.txt', 'C:\\delicious')
# C:\\delicious\\spam.txt'

>>> shutil.copy('eggs.txt', 'C:\\delicious\\eggs2.txt')
# 'C:\\delicious\\eggs2.txt'
content_copyCOPY

https://www.pythoncheatsheet.org/cheatsheet/file-directory-path