Verify the size of a file called     input.txt     for a file in the current working directory, and another one in the file system root.




// root folder
set the defaultfolder to "/"
repeat for each line fline in (the detailed files)
    if item 1 of fline is "input.txt" then
        put item 2 of fline --bytes
        exit repeat
    end if
end repeat
 
// current working dir of stack
put the effective filename of this stack into tPath
set the itemDelimiter to slash
delete last item of tPath
set the defaultfolder to tPath
repeat for each line fline in (the detailed files)
    if item 1 of fline is "input.txt" then
        put item 2 of fline 
        exit repeat
    end if
end repeat