@HideG thanks for the screenshots, they're helpful! As for the problem itself, I wonder if it's because of a bad ' characters (see purple circles in your screenshot below) that is making the command line think your variables string is not a string but part of the command.
Did you copy and paste this command from elsewhere? If so, can you try and remove the ' characters and produce them by typing instead? Alternatively, did you type in this message? If so, can you try to copy and paste the ' character?