

hi,
I have built a workflow,
as per my sender list and folder path list in excel, save outlook attachment, but I want to add current date before original attachment name while saving.
for example - 20240430_FS Cheat Sheet Revised.docx


hi,
I have built a workflow,
as per my sender list and folder path list in excel, save outlook attachment, but I want to add current date before original attachment name while saving.
for example - 20240430_FS Cheat Sheet Revised.docx
You can save all attachments to one folder the way you are currently doing it,
Once done saving all attachments,
Do a for each file in the folder
Assign new file name as:
strNewFileName = System.DateTime.Now.ToString(“yyyyMMdd”) & “_” & System.IO.Path.GetFileName(CurrentItem)
Use the Rename File Activity to change the file name:
will this consider all sub folders. because I have multiple files in multiple sub folders
getting these error, please help
Hope it helps!!!
check the thread
Okay so,
The list files is supposed to be an array of string, see below:
Once you have change the variable type for ListFiles, make sure the for each activity properties are set like this:
TypeArgument: String:
Also this will not work for subfolders, to get files from subfolders as well you would need use this:
System.IO.Directory.GetFiles(“mainFolderPath”, “.”, SearchOption.AllDirectories)
