PPS 6642
PPS 6642
Report on
FILE MANAGEMENT SYSTEM
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
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).
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 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 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
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
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:
b) Open a File:
e) Delete a File:
System Implementation
#include <stdlib.h>
#include <string.h>
if (file == NULL) {
return;
char text[100];
fclose(file);
}
// Function to read and display the contents of a file
if (file == NULL) {
return;
char ch;
putchar(ch);
fclose(file);
if (file == NULL) {
return;
}
char text[100];
fclose(file);
{ if (remove(filename) == 0) {
} else {
int main()
{ int
choice;
char filename[100];
while (1) {
printf("5. Exit\n");
scanf("%d", &choice);
switch (choice)
{ case 1:
scanf("%s", filename);
createFile(filename);
break;
case 2:
scanf("%s", filename);
readFile(filename);
break;
case 3:
printf("Enter filename to append to: ");
scanf("%s", filename);
appendToFile(filename);
break;
case 4:
scanf("%s", filename);
deleteFile(filename);
break;
case 5:
exit(0);
default:
return 0;
}
OUTPUT
1. Create a file
2. Read a file
3. Append to a file
4. Delete a file
5. Exit
1. Create a file
2. Read a file
3. Append to a file
4. Delete a file
5. Exit
1. Create a file
2. Read a file
3. Append to a file
4. Delete a file
5. Exit
1. Create a file
2. Read a file
3. Append to a file
4. Delete a file
5. Exit
1. Create a file
2. Read a file
3. Append to a file
4. Delete a file
5. Exit
[?2004h
SYSTEM TESTING
Test 1:
Test 2:
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.
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
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