mcetl.file_organizer¶
Provides GUIs to find files containing combinations of keywords and move files.
@author: Donald Erb Created on Sep 2, 2019
Module Contents¶
Functions¶
Finds files that match the given keywords and file type using a GUI. |
|
Takes in a list of file paths and moves a copy of each file to the new folder. |
|
Allows manual selection for the files for the selected samples and datasets. |
-
mcetl.file_organizer.
file_finder
(file_directory=None, file_type=None, num_files=None)¶ Finds files that match the given keywords and file type using a GUI.
- Parameters
- Returns
output_list -- A nested list of lists containing the file locations as strings for the files that matched the search term. len(output_list) is equal to the number of datasets, len(output_list[i]) is equal to the number of unique keywords for dataset i, and len(outupt_list[i][j]) is equal to the number of files for dataset i and unique keyword j.
- Return type
-
mcetl.file_organizer.
file_mover
(file_list, new_folder=None, skip_same_files=True)¶ Takes in a list of file paths and moves a copy of each file to the new folder.
- Parameters
file_list (list, tuple, or str) -- A list of strings corresponding to file paths, all of which will have their copies moved.
new_folder (str or Path) -- The folder to move all of copies of the files in the file_list into.
skip_same_files (bool) -- If True, will not move any copied files if they already exist in the destination folder; if False, will rename the copied file and move it to the destination folder.
- Returns
new_folder -- The string of the destination folder location.
- Return type
-
mcetl.file_organizer.
manual_file_finder
(file_type=None)¶ Allows manual selection for the files for the selected samples and datasets.