I have file called abc.xlsx…
I am using move activity and want to rename the file.
I am able to move the file. But how shall i rename the file abc.xlsx to abc_1122.xlsx…
Used trim to remove .xlsx from abc.xlsx before renaming… But npt sble to do… Please help me
Path exists
Here i am using a argument
In_alertsfile = “mail.xlsx”
Taken into boolean variable alertfileexist
Now checkong if condition whether that file os present pr not… If it is present then,
I am moving the file to some folder
Above image u can see,
In_alertsfile is mail.xlsx
And in_alertsbackupfile is folder nsme i. E. “backupfolder”
I want solution is when i am moving the mail.xlsx file to this bsckfolder, it has to get renamed to mail_currentdatetime.xlsx.
Use
Name=path.GetFileNameWithoutExtension(In_alertsfile)
which will give you: mail
Then use
Ext=path.GetExtension(In_alertsfile)
which will give : .xlsx
So while using Destination
Give backupfolderpath+Name+Now.Tostring(“ddMM”)+ext