Advertisement
MrBlackLord

Untitled

Dec 7th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. import os, shutil
  2. cur_dir = os.getcwd()
  3. move_dir = os.getcwd() + '\\pack'
  4. notmovepls = ['pack', 'pack.exe']
  5. cur_files = [i for i in os.listdir(cur_dir) if i not in notmovepls]
  6. def in_folder():
  7.     for file in cur_files:
  8.         shutil.move(file, move_dir)
  9. def out_folder():
  10.     os.chdir(move_dir)
  11.     moved_files = os.listdir(move_dir)
  12.     for file in moved_files:
  13.         shutil.move(file, cur_dir)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement