I am trying to suffix a downloaded file with some data that I want to scrape off from the website
{
“Command”: “store”,
“Target”: “${ClientTFN} Name ${ClientName} Channel ${Channel} Sub ${Subject} Date ${IssueDate}.pdf”,
“Value”: “FileNameDownload”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “x=${FileNameDownload}; return x.replace(/\//g, ‘-’);”,
“Value”: “FinalFileName”
},
{
“Command”: “echo”,
“Target”: “${FinalFileName}”,
“Value”: “”
},
{
“Command”: “onDownload”,
“Target”: “${FinalFileName}”,
“Value”: “true”
},
{
“Command”: “click”,
“Target”: “xpath=//*[@id="atoo-pap-atotablepanel-001"]/ato-table/table/tbody/tr[${TableLoopCounter}]/td[2]/ato-table-cell/div/ato-link/a”,
“Value”: “”
},
Currently I am only able to do a full replace but the original filename gets lost , how do I get the original fileName and then suffix.
I saw this post OnDownload File name with variable - #6 by Abhroneel_Chowdhury
tried Xrun but powershell whill need the original filename as well , either ways how do I get that.