I want to rename file after save file attachment from outlook in my com.
Example : file name Abby report.txt
I want to add text AEC before original name (AEC Abby report.txt)
Please guide me about it.
I want to rename file after save file attachment from outlook in my com.
Example : file name Abby report.txt
I want to add text AEC before original name (AEC Abby report.txt)
Please guide me about it.
Hi
Once after saving the attachment using save attachment activity we can use MOVE FILE activity to rename the file where in source mention the filepath of the file where it is saved
And
In destination part mention like this
“Folder path”+”\”+”AEC “+Path.GetFilenamewithoutextension(“Filepath”)+Path.GetExtension(“filepath”)
Cheers @fairymemay
@Palaniyappan How to get file path?
Because I save file in D:\RPA and It have many files.
I want to rename latest file.
Fine
Hope the below steps would help you resolve this
str_filepath = Directory.GetFiles(yourfolder_path,“*.txt”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)
Where str_filepath is a string variable
“D:\RPA\”+”AEC_”+Path.GetFileNameWithoutExtension(str_filepath)+Path.GetExtension(str_filepath)
Hope this would help you
Cheers @fairymemay
Were we able to change the file name @fairymemay
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.