Include source file name in Copy Task expand

I’ve got a template for a file that I’m going to both expand and rename, using the Copy task. I’d like to include the original source file name (e.g.: Generated from /foo/bar/oofda.gradle-template.xml), so it is easy to trace back to the source. However, if I try to add “file” to the expand properties:

expand([file: file])

I get an error that file does not exist.

Is there some way to provide the file context when doing the expand?