Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os, shutil
- cur_dir = os.getcwd()
- move_dir = os.getcwd() + '\\pack'
- notmovepls = ['pack', 'pack.exe']
- cur_files = [i for i in os.listdir(cur_dir) if i not in notmovepls]
- def in_folder():
- for file in cur_files:
- shutil.move(file, move_dir)
- def out_folder():
- os.chdir(move_dir)
- moved_files = os.listdir(move_dir)
- for file in moved_files:
- shutil.move(file, cur_dir)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement