This project is a file management script in Python. It allows you to create, delete, move, copy, rename, list, search, and display the content of files. It can also rename multiple files and folders in a directory.
- Python 3.11 or higher
- uv for Python environment management
-
Clone the repository:
git clone https://github.com/RitterAntoine/File_Manager cd File_Manager -
Create and activate the virtual environment with
uv:uv venv uv sync source .venv/bin/activate
The main.py script accepts several actions via command line arguments. Here are the available actions:
create: Create a new filedelete: Delete a filemove: Move a filecopy: Copy a filerename: Rename a filelist: List files in a directorysearch: Search for a file in a directoryshow: Display the content of a filerename_multiple: Rename multiple files and folders in a directory
-
Create a file:
uv run main.py create --src <file_path>
-
Delete a file:
uv run main.py delete --src <file_path>
-
Move a file:
uv run main.py move --src <source_path> --dst <destination_path>
-
Copy a file:
uv run main.py copy --src <source_path> --dst <destination_path>
-
Rename a file:
uv run main.py rename --src <old_name> --dst <new_name>
-
List files in a directory:
uv run main.py list --directory <directory_path>
-
Search for a file in a directory:
uv run main.py search --directory <directory_path> --filename <file_name>
-
Display the content of a file:
uv run main.py show --src <file_path>
-
Rename multiple files and folders in a directory:
uv run main.py rename_multiple --directory <directory_path> --old_char <old_character> --new_char <new_character> [--recursive]
This project is open source. You are free to use, modify, and distribute it.