0% found this document useful (0 votes)
13 views21 pages

PPS 6642

The document presents a project report on a File Management System developed in C, aimed at providing users with a simple command-line interface to manage files through operations like creating, reading, writing, and deleting files. It outlines the system's objectives, existing challenges in file management, and proposed enhancements for improved efficiency and security. The report includes system analysis, implementation details, and future enhancement suggestions such as integrating machine learning and blockchain technology.

Uploaded by

kalyanmudiraj16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views21 pages

PPS 6642

The document presents a project report on a File Management System developed in C, aimed at providing users with a simple command-line interface to manage files through operations like creating, reading, writing, and deleting files. It outlines the system's objectives, existing challenges in file management, and proposed enhancements for improved efficiency and security. The report includes system analysis, implementation details, and future enhancement suggestions such as integrating machine learning and blockchain technology.

Uploaded by

kalyanmudiraj16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

A

Report on
FILE MANAGEMENT SYSTEM

CS105ES- PROGRAMMING FOR PROBLEM SOLVING PROJECT


Submitted in partial fulfilment of the requirements for
The Award of the degree of

BACHELOR OF TECHNOLOGY
In
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING(AI&ML)
By
N.SNEHITHA REDDY – 24K81A6642
Under the esteemed guidance of

Mrs.K.Priti
ASSISTANT PROFESSOR
DEPARTMENT OF CSE

DEPARTMENT OF COMPUTER SCIENCE


AND ENGINEERING(AI&ML)
St. MARTIN’S ENGINEERING COLLEGE
UGC AUTONOMOUS
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad –
500100
St. MARTIN’S ENGINEERING COLLEGE
UGC AUTONOMOUS
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad – 500100

College Code: K8
CERTIFICATE
This is certify that the PROGRAMMING FOR PROBLEM SOLVING
PROJECT entitled “FILE MANAGEMENT SYSTEM” is a Bonafide
record of independent work done by N.SNEHITHA
REDDY(24K81A6642) under my supervision and guidance, submitted to
St. MARTIN’S ENGINEERING COLLEGE, Hyderabad, in partial
fulfilment for the award of the Degree of Bachelor of Technology in
COMPUTER SCIENCE AND ENGINEERING (AI&ML).

Project Internal Guide Head of Department


Mrs.K.Priti Dr. R. Ranadheer
Reddy (Dept of CSE) (Dept. of FME)
……………………….. ………………………

Principal
(Dr. P.SANTOSH KUMAR PATRA)
……………………………………………..
ABSTRACT

The File Management System project in C is designed to provide a simple, interactive way
for users to manage their files on a computer. The program allows users to create, read, write,
delete, and manage files through a command-line interface. The system provides an easy-to-
use platform for basic file operations, helping users interact with the file system without
needing to rely on graphical interfaces.

designed to facilitate basic file operations. This system enables users to perform essential file
The File Management System in C is a simple, interactive command-line application
management tasks, such as creating files, writing data to them, reading their contents,
deleting files, and listing files in a directory. The goal of this system is to provide a platform-
independent solution for managing files efficiently and securely.

By utilizing standard C file-handling functions, the system supports operations like opening,
reading, writing, appending, and closing files. It also includes error handling mechanisms to
manage common file-related issues, such as file not found or permission denied errors,
ensuring a robust user experience. This project is intended for educational purposes,
providing a clear understanding of file operations in C while also demonstrating the use of
functions like fopen(), fclose(), fgets(), fputs(), and error handling techniques in a file system.

A file management system in C refers to creating programs that handle the creation, reading,
updating, and deletion of files on a computer system. These programs allow users to
perform file-related operations, such as managing file contents, organizing files, and even
setting file permissions. In C, file management is typically done using standard library
functions that allow manipulation of files through file pointers.

File management in C is a powerful feature that allows programs to interact with the file
system. By mastering file handling functions, you can create applications that read, write,
and manage files effectively, making it essential for many real-world applications.
CONTENTS

ABSTRACT i

CHAPTER 1- INTRODUCTION 1

CHAPTER 2-LITERATURE SURVEY 3

CHAPTER 3-SYSTEM ANALYSIS 9

3.1 Existing System 10

3.2 Proposed System 10

CHAPTER 4-SYSTEM OVERVIEW

4.1 Hardware Requirements 13

4.2 Software Requirements 13

CHAPTER 5- FLOWCHART AND ALGORITHM 22

CHAPTER 6- SYSTEM IMPLEMENTATION 45

CHAPTER 7-SYSTEM TESTING 48

CHAPTER 8-OUTPUT SCREENS 50

CHAPTER 9-FUTURE ENHANCEMENT 55

CHAPTER 10-CONCLUSION 56

CHAPTER 11-REFERENCES
INTRODUCTION

A file management system is an essential part of modern computing, helping users organize,
store, and retrieve digital files efficiently. With the exponential growth of digital data,
effective file management is critical for individuals, businesses, and organizations. A well-
designed file management system allows users to store files in a structured manner, search
for specific documents quickly, and secure data against unauthorized access. Files are
typically organized in directories and subdirectories, providing a hierarchical structure for
easy navigation. In such a system, users can perform various operations like creating,
deleting, renaming, moving, and copying files. Access control features like file permissions
ensure that only authorized users can perform certain actions on files. As digital data
becomes increasingly valuable and integral to daily operations, having an efficient file
management system is crucial for data integrity, productivity, and security.

The FILE MANAGEMENT SYSTEM project is a practical and user-friendly program


developed in the C programming language. This project is designed to help users manage
their files efficiently by automating various file operations, such as creating, reading, writing,
deleting, renaming, and displaying files. By implementing this system, users can quickly
access and organize their files, reducing the complexity of manual file handling and
improving productivity.

The program allows users to perform essential file management tasks with ease, such as
opening and closing files, checking if a file exists, displaying the contents of files, and
modifying files by adding or editing text. The system supports both text files and binary files,
offering a versatile solution for a range of file types.

The File Management System streamlines the process of managing files on a computer,
making it more efficient and user-friendly. It can be beneficial for individuals, small
businesses, and even larger organizations that need to organize their files effectively. This
program is not only an educational tool for learning file operations in C but also a practical
solution for everyday file management tasks.
SYSTEM ANALYSIS

the analysis phase for a File Management System involves planning and defining the
system's functional and non-functional requirements, understanding the user's needs,
conducting a feasibility study, and outlining a development strategy that includes acceptance
criteria and system integration. This phase is critical for laying the foundation for successful
system development and ensuring it meets the desired objectives. The analysis phase of a
File Management System (FMS) involves breaking down the problem into smaller parts,
identifying each part, and understanding the relationships within the system. This includes
studying the various operations the system will perform, as well as its interaction with
external systems or users.

Existing System

In the existing systems for file management, organizations typically rely on manual or semi-
automated methods to store, organize, and retrieve documents and files. These systems are
often basic, where physical files are either manually archived or stored in local storage
systems, such as file cabinets or servers. In more advanced setups, some companies may use
digital storage systems or simple software that offers basic file organization features

Drawbacks of existing system


Time consuming
Lack of Backup
Security Risks
Human Error
Limited Collaboration
Inefficient Search Capabilities
Proposed system
A proposed system for a File Management System aims to provide a structured and efficient
way to store, organize, retrieve, and secure files in a digital environment. Creating a simple
file management system in C involves several file handling operations, such as creating,
reading, writing, updating, and deleting files. This basic system will allow a user to perform
some of the most common operations that a file management system would handle. This
program offers a basic but functional file management system with the ability to perform
simple file operations. You can expand it further to include more advanced file management
features if needed.
Objectives of the proposed System

Efficient File Organization and Storage


File Creation, Reading, Writing, and Deletion
Support for File Metadata Management
File Search and Retrieval
File Access Control and Permissions
Cross-Platform Compatibility (Optional)
File Sorting and Indexing
Hardware Specification

Processor : Intel i5
Processor speed : 2.0 GHZ
RAM : 8 GB
Hard disk drive : 500 GB
Solid State Drive (SSD) 256GB
Software Specifications
File Handling in C

File System Structure


FLOW CHART
Algorithm

1. Start
2. Display a Menu with options:
o Create a file
o Open a file
o Write data to a file
o Read data from a file
o Delete a file
o Exit the system
3. Accept user input to choose an operation.
4. Based on the user's choice, perform the following actions:

a) Create a File:

o Ask for the file name.


o Use fopen() to create the file with write mode ("w").
o If the file is created successfully, display a success message.
o If the file cannot be created, display an error message.

b) Open a File:

o Ask for the file name.


o Use fopen() to open the file in read ("r") or write ("w") mode.
o If the file is opened successfully, display a success message.
o If the file cannot be opened, display an error message.

c) Write Data to a File:

o Ask for the file name and the data to write.


o Open the file using fopen() in write or append mode.
o Use fprintf() or fputs() to write data to the file.
o Close the file using fclose().

d) Read Data from a File:

o Ask for the file name.


o Open the file using fopen() in read mode ("r").
o Use fscanf() or fgets() to read data from the file and display it on the screen.
o Close the file using fclose().

e) Delete a File:

o Ask for the file name.


o Use the remove() function to delete the file.
o If successful, display a success message.
o If unsuccessful, display an error message.

f) Exit the System:

o End the program.


5. Repeat the Menu until the user chooses to exit.
6. End

System Implementation

. The system implementation of a File Management System (FMS) in C refers to designing


and implementing a set of functions that allow a program to interact with the operating
system to manage files. A comprehensive File Management System in C can handle tasks
such as file creation, reading, writing, deletion, and manipulation of files and directories .
There is an there types
Implementation Planning,
Education Planning,
System Planning.
Program
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

// Function to create and write to a file

void createFile(char *filename) {

FILE *file = fopen(filename, "w");

if (file == NULL) {

printf("Error opening file for writing.\n");

return;

char text[100];

printf("Enter text to write to the file: ");

getchar(); // To clear the newline from the buffer

fgets(text, sizeof(text), stdin);

fprintf(file, "%s", text);

printf("Data written to file successfully.\n");

fclose(file);

}
// Function to read and display the contents of a file

void readFile(char *filename) {

FILE *file = fopen(filename, "r");

if (file == NULL) {

printf("Error opening file for reading.\n");

return;

char ch;

printf("Contents of the file %s:\n", filename);

while ((ch = fgetc(file)) != EOF) {

putchar(ch);

fclose(file);

// Function to append data to a file

void appendToFile(char *filename) {

FILE *file = fopen(filename, "a");

if (file == NULL) {

printf("Error opening file for appending.\n");

return;
}

char text[100];

printf("Enter text to append to the file: ");

getchar(); // To clear the newline from the buffer

fgets(text, sizeof(text), stdin);

fprintf(file, "%s", text);

printf("Data appended to file successfully.\n");

fclose(file);

// Function to delete a file

void deleteFile(char *filename)

{ if (remove(filename) == 0) {

printf("File deleted successfully.\n");

} else {

printf("Error deleting the file.\n");

int main()

{ int

choice;

char filename[100];
while (1) {

printf("\nFile Management System\n");

printf("1. Create a file\n");

printf("2. Read a file\n");

printf("3. Append to a file\n");

printf("4. Delete a file\n");

printf("5. Exit\n");

printf("Enter your choice: ");

scanf("%d", &choice);

switch (choice)

{ case 1:

printf("Enter filename to create: ");

scanf("%s", filename);

createFile(filename);

break;

case 2:

printf("Enter filename to read: ");

scanf("%s", filename);

readFile(filename);

break;

case 3:
printf("Enter filename to append to: ");

scanf("%s", filename);

appendToFile(filename);

break;

case 4:

printf("Enter filename to delete: ");

scanf("%s", filename);

deleteFile(filename);

break;

case 5:

printf("Exiting the program.\n");

exit(0);

default:

printf("Invalid choice. Please try again.\n");

return 0;

}
OUTPUT

File Management System

1. Create a file

2. Read a file

3. Append to a file

4. Delete a file

5. Exit

Enter your choice: 1

Enter filename to creollege.txt

Enter text to write to the file: st.martim ns engineering college

Data written to file successfully.

File Management System

1. Create a file

2. Read a file

3. Append to a file

4. Delete a file

5. Exit

Enter your choice: 22

Enter filename to read: college.txt

Contents of the file college.txt:


st.martins engineering college

File Management System

1. Create a file

2. Read a file

3. Append to a file

4. Delete a file

5. Exit

Enter your choice: 3

Enter filename to append to: college.txt

Enter text to append to the file:dhulapally,secunderabad

Data appended to file successfully.

File Management System

1. Create a file

2. Read a file

3. Append to a file

4. Delete a file

5. Exit

Enter your choice: 4

Enter filename to delete: college.txt

File deleted successfully.


File Management System

1. Create a file

2. Read a file

3. Append to a file

4. Delete a file

5. Exit

Enter your choice: 5

Exiting the program.

[?2004h

SYSTEM TESTING

Test 1:
Test 2:

SCOPE FOR FUTURE ENHANCEMENT

Enhanced Security Features for Sensitive Data

 Encryption and Decryption: C provides fine-grained control over system resources,


making it an ideal language for implementing encryption algorithms (e.g., AES,
RSA) for file security. Future FMS in C will focus on integrating advanced
cryptographic methods to ensure that files are securely stored and transmitted.

Integration with Machine Learning for Intelligent File Management

 Automated File Tagging and Sorting: Machine learning algorithms could be


integrated into C-based file management systems to automate file classification,
 categorization, and tagging. These algorithms would use metadata or file content to
suggest sorting or archiving, improving file management efficiency.

Improved File Versioning and Collaboration

 Version Control: C-based file management systems can be extended to incorporate


more advanced version control mechanisms. These systems can track changes to
files, and manage multiple versions efficiently, potentially offering support for
collaborative environments in a low-level system where performance is key.

Backup, Recovery, and Redundancy Systems

 File Backup and Disaster Recovery: A future C-based file management system
could improve data redundancy and disaster recovery by creating more robust backup
systems. The system could automatically create incremental backups, support
distributed backups, and handle data recovery from failures quickly and reliably.

Blockchain for File Integrity

 Blockchain-based File Management: Blockchain technology can be integrated with


C-based file management systems to offer immutable records of file changes and
ownership, ensuring that the integrity of critical documents is maintained. This could
be useful in sectors like legal, healthcare, and finance where data integrity and
provenance are crucial
CONCLUSION

the file management system developed in C language serves as an efficient and reliable way
to handle files, providing functionality to create, read, write, modify, and delete files. By
leveraging C's file handling functions such as fopen(), fclose(), fread(), fwrite(), and others,
we can effectively manage files and organize data within them. The system demonstrates the
importance of handling file operations carefully, especially in terms of opening and closing
files to ensure no data corruption occurs.

Additionally, this file management system allows users to interact with files in a structured
and controlled manner. Proper error checking ensures the system handles unexpected
situations, such as missing files or incorrect file formats, gracefully.

By implementing features like file searching, sorting, and data manipulation, the system not
only showcases basic file operations but also emphasizes the importance of security and
optimization in larger systems. The project can be further extended by incorporating

advanced functionalities such as user authentication, file encryption, or integration with


databases to make it more robust.

Overall, the file management system highlights how file handling operations, when done
correctly, can provide an effective way to manage data in a wide range of applications, from
simple text files to complex databases, within the C programming environment

Reference

1. C Programming Language, 2nd Edition by Brian W. Kernighan and Dennis M. Ritchie.

2. "C Programming: A Modern Approach" by K. N. King.

3. "The C Programming Language" by Steve Summit.

You might also like