File identifier: the file name as a string
A file identifier is the name of the file, written as a string in double quotes with its extension, such as "FileA.txt". The same identifier is used in every file command.
Understanding File identifier: the file name as a string in IGCSE Computer Science Paper 2
What it does: All three commands use the identical identifier "Data.txt", so they all refer to the same file. "Names.txt" is a string in double quotes that includes the .txt extension, so it is a correct file identifier.
Common mistakes: The file identifier is a string, so it must be in double quotes. Line 3 should be WRITEFILE "Names.txt", Name. The same identifier must be used in every file command. "Dairy.txt" is a different name from "Diary.txt". Line 4 should be CLOSEFILE "Diary.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 479–488) and word search (Modules 479–499).
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
"FileA.txt"Fill in the Blanks
Spot the Error
Student with a class code? Join your class →