I have a task where i have three variable such as Key,Username and date. I am automating the attachment download according to the given subject line. My task is that i need to download the document and save it with the senders username and date of sent in a folder which should be named with the name that is in subject line. To be more clear i will put an example where
key = Java developer, Username=“sujisujendar”,date=18jul2019
I should download the attachment which should be renamed as sujisujendar18jul2019 and should save in a folder named as Java developer.
How can i achieve it by using move file activity i am not able to do since the folder is created only when the attachment is downloaded. So i dont know how to give the path in move file activity.
Hi @soumi_soumiya,
1.save the attachment activity can be used for saving into a folder.
2.Then use the move file activity and keep the destination path the same folder path but with different name.
3.Check below screen shot…
Cheers
Vashisht.
Thanks for your reply…
“C:\Users\xyz\Downloads\NameBefore.xlsx”. If this is going to be the existing path i dont know the folder name that is going to be created bcoz i creates according to subject of mail so how can i use this activity
Thanks for your reply…!!
I have a doubt regarding using this movefile activity. i am attaching my design please check it. The folder in which the attachment is going to downloaded will depend on the subject line of the mail so i dont know the folder name in before so how could i give the existing
path and folder name ReadGmailMail.xaml (22.9 KB)
Hi @soumi_soumiya,
You are keeping into the key value folder right ,Which you are taking from the user.
And you are saving with same name of the attachment into that folder?
Hello @soumi_soumiya
You can also use fileSystem.Rename method to rename the file once its in a folder
please check the workflow and understand the logic Soumii.xaml (14.5 KB)
Once check this xaml, i made only some change like in java switch case i kept output for save attachment and it will give the path then moving it to the same folder with different name.ReadGmailMail.xaml (23.4 KB)
I am attaching my design. Can you help me where should i give the invoke function and i have a doubt whether the invoke function will be able to rename all the attachment that is downloaded ReadGmailMail.xaml (22.9 KB)
Yes filename is a variable that stores the username and dmyy is the variable that stores the date and these bot should be used to rename the attachment that is downloaded or while downloading and key is a variable in which the folder should be created to save the downloaded and renamed attachment
Did you give the extension and are you changing the file names while running the bot again and again because usually that error comes if the file already exists.
Thank you sanjay but i am facing an error that it cant create a folder since it already exist but no folders are present in that name what can i should do now