Copy Action syntax / Relevance substitution failed

(imported topic written by TommyG91)

I have scoured around but just can’t find an example of the snytax I need. I was wondering if someone would help me with my syntax here.

This works ok:

dos Copy %windir%\system32\spool\pm\pm.log %windir%\temp%computername%_exportPM.log

but I would rather do it the right way by using “waithidden”, but my syntax doesn’t work. I get “Command failed (Relevance substitution failed)”

waithidden “{pathname of system folder & “\cmd.exe”}” /C copy /Y “{%windir%\system32\spool\pm\pm.log}” %windir%\temp%computername%_export.log

This doesn’t work either

waithidden “{pathname of system folder & “\cmd.exe”}” /C copy /Y “{(value of variable “windir” of environment) & “\system32”\spool\pm\pm.log”}" “{(value of variable “windir” of environment) & “\Temp%computername%_export.log”}”

I’ve tried a few variations, and I think I’m not using my “{”'s correctly?

Thanks in advance for any help you can provide!

(imported comment written by NoahSalzman)

Well, the error in the first example is due to trying to use %windir% in Relevance (it can only be used in ActionScript). Without having tried it, it seems like this should work:

waithidden “{pathname of system folder & “\cmd.exe”}” /C copy /Y “{pathname of system folder & “\spool\pm\pm.log”}” %windir%\temp%computername%_export.log