6.1 File management
Every program, photograph, report and database on a computer is stored as a file, and the operating system must keep track of where each one is, who may use it and how it can be found again. The part of the operating system that does this work is the file management system. Without it, a disk would be a mass of unlabelled data that nobody could search or trust. Example: a county government records office in Embu holds thousands of scanned land documents, and staff can only find them quickly because the computer organises them as named files in folders.
6.1.1 Definition
A file is a named collection of related data or instructions stored on a secondary storage device such as a hard disk, flash disk or memory card. A directory, shown as a folder in Windows, is a container that groups files and other directories. File management is the set of operating system services that create, store, name, organise, retrieve, protect and delete files and directories. Example: when a teacher at Moi Girls High School saves a marks sheet, the file manager gives it a name, finds free space on the disk, records its details and lets the teacher open it again next week.
Types of files
- Text files: Hold readable characters, such as notes, logs and configuration settings. Common extensions are .txt and .csv.
- Document files: Contain formatted text and objects, produced by word processors. Extensions include .docx and .pdf.
- Executable files: Contain programs that the system can run. Windows executables end in .exe, and batch files end in .bat.
- Image, audio and video files: Store pictures and media in formats such as .jpg, .mp3 and .mp4.
- Database and spreadsheet files: Store structured records and figures, for example .xlsx and .accdb.
- System files: Belong to the operating system and are needed for it to start and run, so they are normally hidden and protected.
Information the system keeps about a file
- Name: The label used to identify the file.
- Type and size: The kind of data and the number of bytes it occupies.
- Location: The place on the disk where the data is stored.
- Dates: When the file was created, last modified and last opened.
- Owner and permissions: The user who owns the file and what other users may do with it.
- Attributes: Flags such as read-only, hidden and archive.
6.1.2 Objectives of file manager
The file manager exists to make storage simple, efficient and safe for both users and programs. It hides the physical details of the disk, so that a user works with names and folders and not with sectors and tracks. Each objective answers a practical need in daily computer use. Example: a pharmacy chain in Eldoret needs staff at every branch to find the same price list quickly, keep it safe from accidental deletion and share it without confusion.
- Provide a convenient interface: Users refer to data by name and place in a folder, without knowing where it is physically stored on the disk.
- Manage storage space: The file manager keeps track of used and free blocks, allocates space when a file grows and recovers it when a file is deleted.
- Support file operations: It offers create, open, read, write, rename, copy, move and delete as standard services for all programs.
- Organise files logically: Directories and subdirectories allow related files to be grouped, so that large collections remain easy to search.
- Protect files: It controls who may read, change or run a file and guards against unauthorised access.
- Allow sharing: Several users or programs can use the same file at the right time and with the right permissions.
- Preserve data integrity: It reduces the risk of lost or damaged data, and supports backup and recovery after faults.
- Provide device independence: Files are handled in the same way whether they are on a hard disk, a flash disk or network storage.
6.1.3 File naming concepts
A file name identifies a file in its directory. Each operating system has rules on the characters and length allowed, and good naming habits make files easy to recognise and find. A full name has two parts separated by a dot: the base name and the extension, which tells the system and the user what type of file it is. Example: a Kisumu youth SACCO names its monthly report Loans_Report_2026-03.xlsx so that the subject, date and type are clear without opening it.
File name structure and rules in Windows
- Base name: The part before the last dot, chosen by the user to describe the content.
- Extension: The letters after the last dot, such as .docx or .pdf, which link the file to the program that opens it.
- Length: A full path can be up to 260 characters in classic Windows, so very long names and deep folders should be avoided.
- Forbidden characters: The characters \ / : * ? " < > | cannot be used in a name.
- Reserved names: Names such as CON, PRN, AUX and NUL are used by the system and cannot be used as file names.
- Case: Windows does not distinguish between capital and small letters, so Report.docx and report.docx are the same name in one folder, while Linux treats them as different.
- Uniqueness: Two files in the same folder cannot have the same full name.
Good naming practice
- Be descriptive: Use names that say what the file contains, such as Fee_Statement_Form2.pdf and not Document1.pdf.
- Include dates in a fixed order: Writing the year first, as in 2026-03-15, makes files sort in time order.
- Use underscores or hyphens: These replace spaces and make names clear in web addresses and scripts.
- Use version numbers: Names such as Budget_v1 and Budget_v2 prevent the wrong version from being used.
- Keep a consistent pattern: All staff in an office should follow the same format so that files can be searched reliably.
The rest of this chapter
🔒Create a free account to open more of this chapter.
Free: practical guides, quick cards, workplace scenarios and more.
Create a free account 🔒6.2 File access methods
An access method is the way records inside a file are read or written. The method chosen decides how fast a program can find a record and how much of the file it must pass through to do so. Operating systems and applications support three main methods: sequent…
🔒6.3 File allocation techniques
A disk is divided into equal blocks, and a file is stored in one or more of them. A file allocation technique is the method the operating system uses to decide which blocks belong to which file and to record that information. The choice affects speed, wasted s…
🔒6.4 File protection and security
Files hold the valuable records of an organisation: customer accounts, exam results, payroll, designs and passwords. File protection is the set of measures that keep this data safe from accidental damage, while file security is the set of measures that keep it…
🔒6.5 File and directory operations
File and directory operations are the everyday actions a user performs to organise data: creating, renaming, deleting, copying, moving and setting attributes. In Windows these are carried out through File Explorer, the Command Prompt or PowerShell. Skilful use…
🔒6.6 Local security policy settings
The Local Security Policy is a Windows tool that controls security rules for a single computer, such as how strong passwords must be, how many wrong logins are tolerated and which actions are recorded. It is opened by running secpol.msc and is available in Pro…