Action parameter to use to renames file

(imported topic written by SystemAdmin)

I’m trying to use the action parameter popups of an action to populate the name of a text file. While working on this, I wanted to post to get some assistance (currently fails), and to spark ideas for those looking to do the same.

My language is below, and it is failing out. It is stating in the action debugger "Relevance clauses must be surrounded by {and} guards. I am sure it is simple, please assist.

//Prompts for hostnames of retired and new revices

action parameter query “OLDHostname” with description “Please enter the hostname of the OLD (replaced) device:” with default value “OLD device”

action parameter query “NEWHostname” with description “Please enter the hostname of the NEW device:” with default value “NEW device”

//copy manifest file of original host, and rename it with name of new host

copy "c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter=“OLDHostname”}& “.txt” “c:\Program Files\BigFix Enterprise\BES Client\image_archive”{parameter=“NEWHostname}” & “.txt”

delete "c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter=“OLDHostname”}& “.txt”

(imported comment written by SystemAdmin)

UPDATE: Completes the ‘delete’ line, but file doesnt delete. Fails copy line

//Prompts for hostnames of retired and new devices

action parameter query “OLDHostname” with description “Please enter the hostname of the OLD (replaced) device:” with default value “OLD device”

action parameter query “NEWHostname” with description “Please enter the hostname of the NEW device:” with default value “NEW device”

//copy manifest file of original host, and rename it with name of new host

delete "c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter=“NEWHostname}.txt”

copy "c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter=“OLDHostname}.txt” “c:\Program Files\BigFix Enterprise\BES Client\image_archive”{parameter=“NEWHostname}.txt”

(imported comment written by BenKus)

Try:

//copy manifest file of original host, and rename it with name of new host
delete “c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter “NEWHostname” of action}.txt"
copy “c:\Program Files\BigFix Enterprise\BES Client\image_archive{parameter “OLDHostname” of action}.txt” “c:\Program Files\BigFix Enterprise\BES Client\image_archive”{parameter “NEWHostname” of action}.txt”

(imported comment written by SystemAdmin)

Ben, as always, thank you very much