Intesar
0
Q:

os.move file

import os
import shutil

os.rename("current_path/foo.bar", "new_path/foo.bar")
shutil.move("current_path/foo.bar", "new_path/foo.bar")
os.replace("current_path/foo.bar", "new_path/foo.bar")
2
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")
1

New to Communities?

Join the community