Help with move file and update icon command

I am trying to create a command that moves files in and out of my Windows Startup folder. I have the move part working but need help with two questions that will make it optimum. Is the syntax on line 8 (commented out) not correct to reference the path? Also, Why can I not update my icon in the current view? Thanks

@set $glob:VMtrue
@toggle:if $glob:VMtrue
@set main="C:\Users\Chris\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\VM Windows 10 IDM.lnk"
@set alt="C:\Users\Chris\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\HideStart\VM Windows 10 IDM.lnk"
@set mainpath="C:\Users\Chris\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
@set altpath="C:\Users\Chris\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\HideStart"
@ifexists:C:\Users\Chris\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\VM Windows 10 IDM.lnk
@set $glob:VMtrue=true
@icon:D:\Programs\Directory Opus\Icons for Buttons\VMWARE\VMWactive.png#0,$glob:VMtrue
Copy MOVE {$main} TO {$altpath}
@set $glob:VMtrue=false
@icon:D:\Programs\Directory Opus\Icons for Buttons\VMWARE\VMWnotActive.png#0,!$glob:VMtrue
Copy MOVE {$alt} TO {$mainpath}

@ifexists:{$main} doesn't work because the command parser filters @ifexists clauses before the command itself is run, which means the @set directives have not been processed yet.

The @icon tests don't work properly because value testing of variables isn't supported - only the presence or absence of the variable can be tested for. Instead of setting VMtrue=false you need to delete the variable completely.

OK, now I understand better. Thanks so much