Folder hierarchy and file paths
The location of a file in the folder tree, written from the root (absolute, e.g. /home/sam/file.txt) or from the current folder (relative).
Understanding Folder hierarchy and file paths in WA Computer Science ATAR Unit 1
What it does: It has no leading / or drive letter, so it is read from the current folder and only works if you are in the right place. The double backslash starts a network path: \\server is the remote computer, shared is its shared folder, then the file. A relative path depends on where you are now. An absolute path is the one written from the root. Two dots mean the parent folder, which is one level up in the folder tree. The folder tree has one root (C:\ or /). Absolute paths always start there, whichever folder you are in. Linux separates folders with forward slashes (/). Windows uses backslashes (\).
Common mistakes: Linux paths use forward slashes. The absolute path to the folder is /home/sam, not \home\sam. ./ means the current folder (school), but file.txt is in /home/sam. The relative path must use ../ to go up one folder: cat ../file.txt.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 315–470) and word search (Modules 100–470).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
file pathFill in the Blanks
Spot the Error
Student with a class code? Join your class →