## filemanager.FileOrganizer


A utility class for organizing files in standard directories like Downloads and Documents.


Usage

``` python
filemanager.FileOrganizer()
```


Designed for integration into the labrat tool.


## Methods

| Name | Description |
|----|----|
| [__init__()](#__init__) | Initialize the FileOrganizer class with default directories. |
| [move_file()](#move_file) | Move a file to the destination directory, handling duplicates and logging actions. |
| [move_specific_files()](#move_specific_files) | Move files containing a specific keyword in their names to a designated folder. |
| [organize_all()](#organize_all) | Execute all organizational tasks in sequence. |
| [organize_archives()](#organize_archives) | Organize archives into subfolders by compression type. |
| [organize_by_year()](#organize_by_year) | Organize files into subfolders by year based on the last modified timestamp. |
| [organize_documents()](#organize_documents) | Organize documents into subfolders by type and year. |
| [organize_files()](#organize_files) | Organize files into standard categories (e.g., Pictures, Videos). |
| [organize_science_files()](#organize_science_files) | Organize scientific data files into a dedicated research files folder. |

------------------------------------------------------------------------


#### \_\_init\_\_()


Initialize the FileOrganizer class with default directories.


Usage

``` python
__init__()
```


------------------------------------------------------------------------


#### move_file()


Move a file to the destination directory, handling duplicates and logging actions.


Usage

``` python
move_file(src_file, dest_dir)
```


##### Parameters


`src_file: Path`  
The source file to move.

`dest_dir: Path`  
The destination directory where the file will be moved.


------------------------------------------------------------------------


#### move_specific_files()


Move files containing a specific keyword in their names to a designated folder.


Usage

``` python
move_specific_files(keyword="specific")
```


##### Parameters


`keyword: str = ``"specific"`  
Keyword to match in filenames. Default is 'specific'.


------------------------------------------------------------------------


#### organize_all()


Execute all organizational tasks in sequence.


Usage

``` python
organize_all()
```


------------------------------------------------------------------------


#### organize_archives()


Organize archives into subfolders by compression type.


Usage

``` python
organize_archives()
```


------------------------------------------------------------------------


#### organize_by_year()


Organize files into subfolders by year based on the last modified timestamp.


Usage

``` python
organize_by_year(file_path, base_dir)
```


##### Parameters


`file_path: Path`  
The file to organize.

`base_dir: Path`  
The base directory where files are organized.


------------------------------------------------------------------------


#### organize_documents()


Organize documents into subfolders by type and year.


Usage

``` python
organize_documents()
```


------------------------------------------------------------------------


#### organize_files()


Organize files into standard categories (e.g., Pictures, Videos).


Usage

``` python
organize_files()
```


------------------------------------------------------------------------


#### organize_science_files()


Organize scientific data files into a dedicated research files folder.


Usage

``` python
organize_science_files(science_dir=None)
```


Handles common scientific file formats including: - Bioinformatics: fastq, fasta, sam, bam, vcf, bed, gff, gtf - Astronomy: fits, hdf5, nc (NetCDF) - General: csv, tsv, json, h5, parquet - Computational: ipynb, py, r, R


##### Parameters


`science_dir: Path = None`  
Custom directory for science files. Defaults to Documents/Research_Data.
