String Concatenation

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=“soumisoumiya”,date=18jul2019
I should download the attachment which should be renamed as soumisoumiya18jul2019 and should save in a folder named as Java developer.
First thing i should remove the double quotes in the username for that i used the following functions
username.replace(" “, “”)
Split(username.Tostring(),”<“)(0).Remove(username.Length-1 ).Trim
Split(username.Tostring(),”<“)(0).Replace(” " , “”).Trim
but nothing works
and to rename the file i had given as
this function creates the folder in the name that key has but i need to rename the document name too i dont know how to achieve it.
I also tried move file activity but it does not works fine.
Can any one help me…

Thanks and Regards
Soumiya S

1 Like

Hi, this thread might help you:

In save attachment activity you can use…

what file extension should i give

same file extension as the attachment which you are downloading

java developersoumisoumiya18Jul2019.FileExtension
i am getting this as a folder name but i should not get like this. username and date wil be replaced as file name and key should be used for creating the folder name.

Usually when we are trying to save the file with save attachment, with different filename we want, we need to read the attachment as filestream and then only we can change the name of the file else it will be created as folder by usual
Kindly have a look on this thread to the last comment that could definitely help you resolve this

this in addition

Kindly correct me if i have understood the query wrongly
Cheers @soumi_soumiya

1 Like

Thanks for your reply

I am not able to implement this in my code i am not sure how to implement this

The file does not open in my system due to edition fault can u give the command alone to be used to rename the doc

Hello @soumi_soumiya
To replace Quotes you’ll have to put in inside quotes for the system to recognise it as a quote and for rest
Check this workflow out and understand the logic
Soumii.xaml (14.5 KB)

1 Like

Thanks for your reply…
I am done with it