You should be more specific. Something like
for f in *; do
mv $f /path/to/$(grep NAME $f)
would be along the lines of what you want but almost certainly wouldn't get it as is. If you had a couple of files in the current directory called 'foo' and 'bar' and the contents of foo were
and bar was
and you grepped for '[0-9]' it would move them to /path/to/123 and /path/to/789.