Passing dynamic value {o} REframework

Hi friends,

I have file name in Reframework config file as below,

Backup filename= C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx

i need to pass yyyyMMddhhmm to {0}.
how can pass this variable to {0} in the workflow.

for example copy file.

From file: C:\Users\XXX\XX\Documents\UiPath\result.xlsx
To file: C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx —> i will take this from config file, but pass YYYYMMddHHmm instead of {0}

@oshan I believe you can use String Replace function

2 Likes

@oshan
Please try String.Format(The fileName, yyyyMMddhhmm value)

2 Likes

@oshan

You can do using String.Format

Eg Syntax : String.Format("{0} {1} {2} …", “value1”,“value2”,“value3”)

Hope this works

Thanks

2 Likes

@oshan in UIpath studio ,

filename= C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx

Updated FileName= String.Format(filename,Datetime.Today.tostring(“yyyyMMddhhmm”)) or
Updated FileName= String.Format(filename,Datetime.Now.tostring(“yyyyMMddhhmm”))

2 Likes

thanks a lot guys. for the quick response. it worked

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.