Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Copy

# nead shutil module
>>> import shutil
# copy file
>>> shutil.copy('hello.txt', 'folder1/helloCopy.txt')
'folder1/helloCopy.txt'

# copy folder
>>> shutil.copytree('folder1/', 'folder1_backup/')
'folder1_backup'

Move

# move file
>>> shutil.move('moveme.txt', 'folder1/')
'folder1/moveme.txt'

# rename file
>>> shutil.move('folder1/moveme.txt', 'folder1/moveme_new.txt')
'folder1/moveme_new.txt'