I want to know how to copy the file. I thought it would be in the os module, so I looked it up, but it's not here ㅜ<
python filesystems
shutilUse the module
I'll tell you 2 ways.
src = '/dir1/filename'
dst = '/dir2'
copyfile(src, dst)
copyfile() is
import shutil
shutil.copy2('/dir/file.ext', '/new/dir/newname.ext')
#or
shutil.copy2('/dir/file.ext', '/new/dir')
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
578 Understanding How to Configure Google API Key
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.