tidyup is a powerful command-line tool that organizes files in a specified directory into categorized subfolders. It offers multiple options to customize the organization process, ensuring your directories remain clean and structured.
- Organizes files into subfolders by:
- File Extensions (e.g.,
mp4,pdf). - Starting Names (e.g.,
project-a,report). - Creation Dates (e.g.,
2024-12-24).
- File Extensions (e.g.,
- Handles file naming conflicts automatically.
- Provides a detailed summary of the organization process.
- Compatible with Windows, macOS, and Linux.
First, ensure you have Node.js installed on your system.
-
Install
tidyupglobally via npm:npm install -g tidyup
-
Verify the installation:
tidyup --version
Run the tidyup command, specifying the directory to organize and the desired options.
tidyup [directory] [options]If no directory is specified, the current directory (.) is used by default.
--ext: Organize files into folders based on their file extensions.--name: Group files by their starting names.--date: Group files by their creation dates.--ignore-dotfiles: Ignore dotfiles when organizing.
Note: Some of these options cannot be used together. For example, you cannot use
--extand--namesimultaneously, but you can use--ignore-dotfileswith any one other option.
tidyup /path/to/directory --extExample output:
Organization Summary for '/path/to/directory':
- Folder: mp4
- Created
- Files added: 3
- Folder: pdf
- Already existed
- Files added: 1
tidyup /path/to/directory --nameExample output:
Organization Summary for '/path/to/directory':
- Folder: project-a
- Created
- Files added: 4
- Folder: report
- Already existed
- Files added: 2
tidyup /path/to/directory --dateExample output:
Organization Summary for '/path/to/directory':
- Folder: 2024-12-23
- Created
- Files added: 2
- Folder: 2024-12-24
- Already existed
- Files added: 3
tidyup /path/to/directory --name --ignore-dotfilesExample output:
Organization Summary for '/path/to/directory':
- Folder: project-a
- Created
- Files added: 4
- Folder: report
- Already existed
- Files added: 2
tidyup /path/to/directory --ext --nameError output:
The --ext, --name, and --date options cannot be used together.
-
Clone the repository:
git clone https://github.com/code-env/tidyup.git
-
Navigate to the project directory:
cd tidyup -
Install dependencies:
npm install
-
Build the project:
npm run build
-
Test locally:
node ./dist/index.js <directory> [options]
We welcome contributions! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with your changes.
This project is licensed under the ISC License. See the LICENSE file for more details.
tidyup is developed and maintained by Bossadi Zenith.
Happy organizing! 🎉
Let me know if this aligns with your requirements or needs further customization.