▶ Free previewModuleFiles: where your work actually lives

What a file really is

Funmi is applying for a job. The application form says: "Upload your CV." She clicks Browse, and a window opens asking her to find the file.

"It's on my desktop," she says, and finds it: CV.docx. Click. Upload. Done.

But is it really "on her desktop"? Her desktop is a picture on a screen — pixels, lit up by numbers (Lesson 2.4). Her CV is not inside the picture. So where is it, physically? What exactly did the upload button send? And when she saved her CV last night, what actually happened inside the machine?

You have everything you need to answer those questions. Storage holds bits as trapped electrons or magnetised spots (Lesson 4.4). The operating system manages the storage (Lesson 5.2). In this lesson you will see the last piece: how billions of anonymous bits on a drive become files with names, sizes and dates — and what really happens when you save, delete, or sell a computer.

Words in this lesson

WordWhat it means
FileA named collection of bytes kept in storage
MetadataInformation about a file, such as its name, size and dates, kept alongside it
File systemThe system that keeps track of every file's name and where its bytes sit on the drive
Folder (directory)A container for files and other folders
SaveWriting what is in memory to storage, under a name
Recycle Bin / TrashA holding place for deleted files, from which they can be restored
Cloud storageFiles kept on another company's computers, reached over the internet

A file is a named list of bytes

Look at Funmi's CV in File Explorer, and Windows might say its size is 24 KB — about 24,000 bytes. That is all a file is: a list of bytes, each one a number from 0 to 255 (Lesson 2.2), kept in storage, with a name so people and programs can find it.

The bytes themselves mean nothing until a program interprets them. In a text file they are character codes (Lesson 2.3); in a photo they are colour numbers (Lesson 2.4); in a song they are sound samples (Lesson 2.5); in an app they are machine-code instructions (Lesson 5.1). The storage drive does not know or care which. To the drive, it is all just bytes.

Alongside the bytes, the computer keeps information about the file: its name, its size, when it was created, when it was last changed. This is called metadata — data about data. In File Explorer, choose the Details view and you can see some of it in columns: Name, Date modified, Type, Size.

The file system: the drive's catalogue

A storage drive is, underneath, a huge numbered row of blocks of bytes — billions of them. Nothing on the drive itself says "Funmi's CV starts here". So how does the computer find it?

Think of a large library. The books sit on numbered shelves, but nobody wanders the shelves looking for a title. There is a catalogue: a list of every book's title, with the shelf where it sits. To find a book, you look in the catalogue first.

The file system is the drive's catalogue. It is a structure kept on the drive itself that records, for every file, its name, its metadata, and which blocks hold its bytes. Microsoft describes NTFS as the default file system for modern Windows; Apple says APFS is the default file system for Macs running macOS 10.13 or later.

Two things about the catalogue will surprise you:

  • A file's bytes need not sit together. A large file may be stored in pieces in different places on the drive, with the file system recording where each piece is. That is why Lesson 4.4's hard disks needed defragmenting — to gather the pieces so the arm swings less.
  • Folders are files too. Microsoft explains that a directory — a folder — is simply a file with a special attribute marking it as a directory. A folder is just a small list of the names inside it, kept in the same catalogue as everything else. The tidy tree of folders you see is the file system's way of organising its own list.

This is the job Lesson 5.2 promised you would look at closely: the operating system keeping track of where every file's bytes actually sit.

What "Save" actually does

In Lesson 3.4, Tunde lost two hours of work in a power cut because he had not saved. Now you can see exactly what saving would have done.

While Tunde typed, his chapter existed only in RAM — the counter of the kitchen, held by electricity. When you press Ctrl+S:

  1. The app asks the operating system to save these bytes under this name, in this folder.
  2. The file system finds free blocks on the drive and notes them in its catalogue.
  3. The bytes are copied from RAM, through the storage driver (Lesson 5.2), onto the drive — as trapped electrons on an SSD, or magnetised spots on a hard disk (Lesson 4.4).
  4. The catalogue is updated: the file's name, size, date modified, and where its bytes now sit.

From that moment, the work is in the storeroom. The power can go and it will still be there.

Save writes the current version over the file's previous version. Save As (or Save a Copy) writes it under a new name or in a new place, and leaves the old file exactly as it was. Use Save As when you want to keep the old version — for example, before making big changes to a document a client has already approved.

What "Delete" actually does

When you delete a file in Windows, it usually goes to the Recycle Bin (on a Mac, the Trash). Nothing has been destroyed yet: the file has just been moved to a holding folder. Microsoft explains you can open the Recycle Bin, right-click a file and choose Restore to put it back where it was.

When you empty the Recycle Bin, something more interesting happens. Microsoft explains that the space used by a deleted file is marked as free space — which means the file's data can still exist and be recovered, until something else is written over it. The catalogue entry goes; the bytes stay, for now, as if the library removed a book's card from the catalogue but left the book on the shelf until someone needs the space.

Two lessons follow:

  • If you delete something by mistake, stop using that drive as much as you can. Microsoft warns that any use of your computer can create files that may overwrite the free space at any time. Microsoft offers a tool called Windows File Recovery for trying to recover files that are no longer in the Recycle Bin — but it can only find what has not yet been overwritten.
  • Deleting is not destroying. Which leads to the next idea.

Selling or giving away a computer

If emptying the Recycle Bin leaves the bytes on the drive, then a laptop you sell could carry your CV, your photos, your clients' files and your saved passwords to a stranger.

Microsoft's advice for exactly this situation is its Reset this PC feature with the Remove everything option, which reinstalls Windows and removes all your personal files, apps and settings. Microsoft recommends turning on its clean data option if you are going to donate, recycle or sell the PC: it takes longer, but Microsoft says it makes it harder for other people to recover the files you removed. And Microsoft's first instruction is the most important: back up important files before you begin — because after a reset, they are gone for you too.

Before you sell a phone or laptop: back up, sign out of your accounts, then reset it properly. Before you buy a used one (Lesson 4.5): reset it yourself, so you start clean.

Local or cloud: where your files actually are

So, back to Funmi's question: where is her CV?

If it is in a normal folder on her laptop, it is in local storage: a pattern of trapped electrons in the SSD inside her laptop, recorded in the NTFS catalogue under the name CV.docx in her Desktop folder.

If she keeps it in OneDrive or Google Drive, it is in cloud storage as well. "The cloud" sounds like it floats somewhere. It does not. It is storage drives — exactly like the ones in Module 4 — in buildings owned by Microsoft or Google, reached over the internet. The sync app keeps a copy on her laptop and a copy on their drives, and updates each when the other changes. You will see where those buildings are, and how a file reaches them, in Modules 7 and 8.

And when Funmi pressed Upload, her browser read the bytes of CV.docx from her drive and sent a copy — the same list of bytes — across the internet to the company's computers. The original stayed exactly where it was.

Common mistakes

The mistakeWhy it is wrongWhat to do instead
"My file is on the desktop" (as if the desktop holds it)The desktop is a picture of a folder; the bytes are on the storage driveThink: bytes on the drive, recorded in the catalogue
Assuming typed work is in the file before savingUntil you save, it is only in RAMSave early and often: Ctrl+S / Command-S
Using Save on a client-approved version before big changesSave overwrites the previous versionUse Save As to keep the old version
"Empty the Recycle Bin and it's gone forever"The space is only marked as free until overwrittenReset properly with clean data before selling a PC
"The cloud is somewhere in the sky"Cloud storage is drives in someone else's buildingsKnow which of your files are local, cloud, or both

The short version

  • A file is a named list of bytes in storage, plus metadata — name, size, dates. The bytes mean something only to the program that reads them.
  • The file system is the drive's catalogue: for every file, its name, metadata and which blocks hold its bytes. NTFS is Windows' default; APFS is the Mac's. A folder is a special kind of file.
  • Save copies bytes from RAM to free blocks on the drive and updates the catalogue. Save As writes a new file and leaves the old one.
  • Deleting moves a file to the Recycle Bin. Emptying it marks the space as free; the bytes remain until overwritten.
  • Before selling a PC, back up and use Reset this PC → Remove everything with clean data.
  • Cloud storage is drives in another company's buildings; sync keeps copies in both places.

Try it yourself

Look behind your files.

  1. In File Explorer (Windows key+E), open your Documents folder and switch to the Details view. Write down the name, size, type and date modified of three files. Convert each size to bytes.
  2. Right-click one file and choose Properties. What metadata does Windows show? (On a Mac, select a file and choose File → Get Info.)
  3. Create a small text file in Notepad, type one sentence and save it. Check its size in bytes. Count the characters in your sentence. Are the two numbers close? Using Lesson 2.3, explain why.
  4. Delete that file, open the Recycle Bin, and restore it. Then explain, in your own words, what would have happened to its bytes if you had emptied the Recycle Bin instead.
  5. Make a list of where your five most important files live: local only, cloud only, or both.

You'll know you've got it when you can explain to Funmi exactly where her CV is, what happened when she saved it and when she uploaded it — and why emptying the Recycle Bin is not the same as destroying a file.