Change icon from cli for panel items

Is it possible to change the icon of a panel item from the command line?

or

Is it possible to have another directory open when changing an icon?

I want the directory /home/andy/ICONS/ to be selected.

The directory opened sometimes changes depending on the program I want to change the icon for.