Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import shutil
- """
- A primitive file copier from an array.
- An array of necessary files is passed, a directory for searching, a directory where to copy.
- In the case of an undefined format, add conditions.
- """
- if __name__ == '__main__':
- excel_arr = []
- current_dir = ''
- new_dir = ''
- for root, dirs, files in os.walk(current_dir):
- for file in files:
- for excel in excel_arr:
- if excel in file:
- excel_path = str(os.path.join(root, file))
- shutil.copy(excel_path, new_dir)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement