Answers for "moving files from one folder to another python"

7

python move file

import os, shutil
#move picture.png from /some/dir/ to /another/dir/Pictures/
shutil.move('/some/dir/picture.png', '/another/dir/Pictures/')
Posted by: Guest on July-06-2020
3

move file python

import os
import shutil

os.rename("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")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
Posted by: Guest on November-04-2020
0

os.move file

import os
import shutil

os.rename("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")
os.replace("path/to/current/file.foo", "path/to/new/destination/for/file.foo")
Posted by: Guest on August-24-2020

Code answers related to "moving files from one folder to another python"

Python Answers by Framework

Browse Popular Code Answers by Language