Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Mini File Manager

📋 Table of Contents

📝 Description

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.

✨ Features

  • 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

🔧 Prerequisites

  • C compiler (GCC, Clang, or MSVC)
  • Basic knowledge of command line operations

🚀 Installation

Step 1: Clone or Download

Download the file_manager.c file to your local machine.

Step 2: Compile the Program

On Windows (using GCC/MinGW):

gcc file_manager.c -o file_manager.exe

On Linux/Mac:

gcc file_manager.c -o file_manager

Using Clang:

clang file_manager.c -o file_manager

💻 Usage

Running the Program

On Windows:

file_manager.exe

On Linux/Mac:

./file_manager

Program Flow

  1. The program displays a main menu with 5 options
  2. Enter your choice (1-5) to perform the desired operation
  3. Follow the prompts to complete the operation
  4. Return to the main menu to perform additional operations
  5. Choose option 5 to exit the program

📖 Examples

Main Menu Interface

Mini File Manager
1. Create file
2. View file
3. Append to file
4. Delete file
5. Exit
Enter choice: 

Example 1: Creating a File

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.

Example 2: Viewing a File

Enter choice: 2
Enter filename to view: my_notes.txt
Meeting Notes:
- Discuss project timeline
- Review budget allocation
- Plan next sprint

Example 3: Appending to a File

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.

Example 4: Deleting a File

Enter choice: 4
Enter filename to delete: my_notes.txt
File deleted.

Example 5: Exiting the Program

Enter choice: 5
Goodbye!

📁 File Structure

Mini File Manager/
├── file_manager.c    # Main source code
├── README.md         # This documentation
└── file_manager.exe  # Compiled executable (after compilation)

🔍 Error Handling

The program includes basic error handling for:

  • File already exists (when creating)
  • File not found (when viewing/appending)
  • Permission denied
  • Invalid user input

🛠️ Development

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.

📄 License

This is a simple educational project. Feel free to use, modify, and distribute as needed.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages