A simple command-line file manager written in C that provides basic file operations through an intuitive menu-driven interface. Perfect for learning C programming concepts and basic file I/O operations.
- Create Files: Create new text files with custom content
- View Files: Display the contents of existing files
- Append to Files: Add content to existing files
- Delete Files: Remove files from the filesystem
- User-Friendly Interface: Simple menu system for easy navigation
- C compiler (GCC, Clang, or MSVC)
- Basic knowledge of command line operations
Download the file_manager.c file to your local machine.
On Windows (using GCC/MinGW):
gcc file_manager.c -o file_manager.exeOn Linux/Mac:
gcc file_manager.c -o file_managerUsing Clang:
clang file_manager.c -o file_managerOn Windows:
file_manager.exeOn Linux/Mac:
./file_manager- The program displays a main menu with 5 options
- Enter your choice (1-5) to perform the desired operation
- Follow the prompts to complete the operation
- Return to the main menu to perform additional operations
- Choose option 5 to exit the program
Mini File Manager
1. Create file
2. View file
3. Append to file
4. Delete file
5. Exit
Enter choice:
Enter choice: 1
Enter filename to create: my_notes.txt
Enter content (end with empty line):
Meeting Notes:
- Discuss project timeline
- Review budget allocation
- Plan next sprint
File created.
Enter choice: 2
Enter filename to view: my_notes.txt
Meeting Notes:
- Discuss project timeline
- Review budget allocation
- Plan next sprint
Enter choice: 3
Enter filename to append: my_notes.txt
Enter content to append (end with empty line):
Additional Notes:
- Schedule follow-up meeting
- Update documentation
Content appended.
Enter choice: 4
Enter filename to delete: my_notes.txt
File deleted.
Enter choice: 5
Goodbye!
Mini File Manager/
├── file_manager.c # Main source code
├── README.md # This documentation
└── file_manager.exe # Compiled executable (after compilation)
The program includes basic error handling for:
- File already exists (when creating)
- File not found (when viewing/appending)
- Permission denied
- Invalid user input
This project is written in standard C and should compile on any platform with a C compiler. The code uses standard library functions for file operations and user input handling.
This is a simple educational project. Feel free to use, modify, and distribute as needed.