What's a folder, and what's a file path?
Follow a worked example, then find a file yourself with the terminal in your browser and write its path.
Free course. Your Maestro, an AI, .
A folder is a container with a name: it holds files, and it can hold other folders. Since one folder can live inside another, together they form a tree: at the top is your home folder, inside it your Documents, inside that a Reports folder, and inside that, at last, the file.
A Glossary term is the route you take through that tree to reach a file: the name of each folder, in order, and the file's name at the end. It's the file's address, like a street, number and neighborhood.
Your home folder
the starting point
Documents
Reports
ventas_marzo.csv
the file
When you double-click in File Explorer or Finder, your computer walks that route for you. A Glossary term lets you walk it by typing, and that has one big advantage: you always see which folder you're in and what's there. You'll use just four commands:
| Command | What it does |
|---|---|
pwd | Tells you which folder you're in. |
ls | Lists what's in that folder. |
cd informes | Takes you into the informes folder. cd .. takes you back up one folder. |
cat notas.txt | Shows what's inside a text file. |
cd doesn't move files: it moves you. It's like walking from one room to the next.
Below is La Tapatía's folder of sales reports, with one file per month and year (the folders have Spanish names: informes means reports, ventas means sales). First, watch how to find one, step by step. Before you open each step, try to say which command comes next.
Finding the February 2026 sales
Worked example · 5 steps
Ana asks you for the February 2026 sales from all three branches. You know they're somewhere in the project's reports folder below, but not which folder exactly. How do you find them with the terminal, and what's their path?
Work out the next step yourself, then open it to compare.
Your turn
Ana also needs the sales for March 2026. Same route, this time without the steps laid out. Heads up: the project has more than one file named ventas_marzo.csv.
- Find it with
pwd,ls,cdandcat, like in the example, and usecatto make sure its dates are from March 2026. - Go back to the project folder, put its path in
RUTAinsideabrir.py, and runpython abrir.py. You've got it when it says it found the file ininformes/2026with 4 rows of sales.
If you get stuck, ask your Maestro about what the terminal told you.
Before you start looking, run python abrir.py once without changing anything. The path still says just ventas_marzo.csv, and your terminal should reply with this:
Nothing found at: ventas_marzo.csvUse ls and cd to check which folder the file is in.You didn't break anything. The program looked for a file with that name in the project folder, and there isn't one there: both ventas_marzo.csv files are further in. That message is your starting point. Once the path is right, the program will tell you which folder it found the file in and how many rows of sales it has.
Your turn
Find the March 2026 sales with pwd, ls, cd and cat. Then put its path in abrir.py, counted from the project folder, and run python abrir.py. You've got it when it says it found ventas_marzo.csv in informes/2026 with 4 rows of sales.
- informes
- 2025
- 2026
Enter runs · ↑ ↓ history · → accepts · helpCtrl+Enter runs · Tab indents · Esc then Tab leaves · Ctrl+` terminal
Look at what you just did: there were two files named ventas_marzo.csv, and only the path tells them apart. informes/2026/ventas_marzo.csv and informes/2025/ventas_marzo.csv are two different addresses. That's why, when someone tells you "it's in the sales folder," you're still missing information.
Tomorrow at work
Next time you ask for a file, ask for its path too, or at least the folders you have to go through. And when you send one, do the same: "it's in Reports, inside 2026" saves everyone a round of messages. If all you get is a name and you find two files called the same thing, don't guess: open them, like you did with cat, or ask which one it is. A repeated name is exactly when opening the wrong file feels just like opening the right one.