Hi All
I have an Excel file which I want to rename to current date.
I am trying move, copy, invoke code, but it says “File format not supported”.
Can you please help in this regard what way the file name should be written in order to have it renamed.
I am using Move File Activity and in Destination I am giving as:
“C:\Users\Project Name\StatusReport\FileName”+Now().ToString(“dd-MM-yyyy hh:mm:ss”)+“.xlsx”
but still it gives “The given path’s format is not supported”
A filename can’t have certain characters. I recommend for dates, only use ‘.’ or ‘-’ Now.ToString("yyyyMMdd.HHmmss")
EDIT: also, reason I used that format is so you can sort the files by the date. If you use MMddyyyy, then all the months from 2019 and 2020 will be sorted together rather than in order.