A simple command-line based File Creator built using Node.js.
This project allows users to create files by entering a filename and content through terminal input.
- Create files from terminal input
- Accept custom filename from user
- Accept file content dynamically
- Automatically generates
.txtfile - Displays success message after file creation
- Node.js
- JavaScript (ES Modules)
- File System (fs module)
NodeJS-CLI-Project-File-Creater/
│── filecreater.js
│── package.json
│── package-lock.json
│── .gitignore
Clone the repository:
git clone https://github.com/godhaniyaarbham2000-spec/NodeJS-CLI-Project-File-Creater.git
Go to project folder
cd NodeJS-CLI-Project-File-Creater
Install dependencies (if any):
npm install
Run the project:
node filecreater.js
In this project, the user is prompted to enter a filename and content through the terminal.
The application then creates a new .txt file with the given name and writes the provided content into it.
Process:
- User enters filename
- User enters file content
- Node.js creates a new file
- Content is written into the file
- Success message is shown
Enter your filename: test
Enter the Content: hi arbham mer
File "test.txt" created successfully
- File will always be created with
.txtextension - Ensure valid filename input
- Add delete file feature
- Add rename file feature
- Add folder creation support
- Add interactive CLI menu system
Arbham Godhaniya
MERN Stack Developer