How do I move a file in Python?

PHOTO EMBED

Tue May 23 2023 19:23:53 GMT+0000 (Coordinated Universal Time)

Saved by @Rapha9000 #python

import os
import shutil

os.rename("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
shutil.move("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
content_copyCOPY

https://stackoverflow.com/questions/8858008/how-do-i-move-a-file-in-python