@amitkys/dirmanager
v1.0.2
Published
## Description
Downloads
12
Readme
Sabnam CLI
Description
Sabnam CLI is a simple command-line interface tool for managing directories and files. It allows users to list directory contents, create new directories, and create empty files.
Installation
Ensure you have Node.js installed on your system. Then, install the dependencies and link the CLI tool globally:
npm install
npm linkUsage
Run the CLI tool with the following commands:
List Directory Contents
sabnam -l [directory_path]If no directory path is provided, it lists the contents of the current directory.
Create a Directory
sabnam -m <directory_name>Creates a new directory with the specified name.
Create a File
sabnam -t <file_name>Creates a new empty file with the specified name.
Examples
Listing Directory Contents
sabnam -l /home/user/documentsCreating a Directory
sabnam -m my_new_directoryCreating a File
sabnam -t myfile.txtError Handling
- If the specified directory does not exist when listing contents, an error message is displayed.
- If a directory already exists when attempting to create it, nothing happens.
- If a file already exists when attempting to create it, it remains unchanged.
License
This project is licensed under the MIT License.
