I have to download files from email every time. For example, an email received 6 files, 3 of them start with the word usa and 3 others with the word esp. I want to create a dynamic folder called usa and put the files that started with usa in it.
I need advice or something that can help.
Thank you .
After downloading attachments to a specific folder, and then you can loop in this folder. For every file in this folder, use Path Exist to control there is a folder with this file name.
If there isn’t a folder use Create Folder activity to create a folder and use Move To activity to move file.
To take first 3 characters of file you can use:
Path.GetFileName(file).Substring(0,3)
Well, what condition do I have to add for files with similar names after I get all the names through Loop,
For example I got the name usa and the name esp…
and then i want to loop in all usa in first itration and the seccond one for esp…