Printing a file location which is a Variable

And if (more likely :- ) it is the contents of the file, rather than its path, which you want to print, then you need to convert from the URL representation (“file://” etc, as used by browsers) to the unix style file path representation which OS X functions expect.

 "file://localhost/Users/robintrew/Desktop/Some%20file%20that%20we%20want%20to%20print.txt"

 → 

"/Users/robintrew/Desktop/Some file that we want to print.txt"

See How do I decode a URL using KBM?