You would need to use double-quotes rather than single quotes so that the shell gets in and expands them for you. This may, however, cause issues with the existing double-quotes.
You can try changing them to single quotes or escaping them.
It would help to show the error returned, however what you are doing with the command like this is to call nawk with confused arguments because you have double quotes throughout.
In addition to what RudiC has already suggested, since the variable you want to use is the name of the file being processed by your awk script, you could more simply just use:
nawk '/<name>/{A=1;++i} A{print >> ("cmd" i "_" FILENAME)} /<\/name>/{A=0}' "$entry"
but you may run out of file descriptors (especially with nawk ) depending on how many output files you are creating. You could avoid that problem using:
but, due to the complicated nesting of quotes, it is harder to read, easier to make mistakes, and harder to debug when it doesn't work.
Or, the way rbatte1 was trying to do it with: