I just save the filename as a string... Or if you insist on encrypting your files somehow, then use a string array. Each number you write to the level file refers to an index in the array that contains the correct filename string.
dim ObjName(10) as string
ObjName(1) = "Block1.x"
ObjName(2) = "OtherBlock.x"
Then, in your loading code (you were using floats, right?):
read float 1, Name1
....
for i=1 to 10
if Name1 = i
load object ObjName(i), blah, blah, blah
next i
Of course, that for loop would probably be nested in another, which loops through an array of names loaded from the file and sets up their data. Or, you could have a loop around the entire data-reading bit, and not have any need for the loaded names to be in an array, just the reference list you're comparing them to.