Saving text files to drive with different names

Hi, I am trying to save text files with different names in a folder. i am using a type into activity with the below expression - “File.Create(“C:\Users\rsugesh\Desktop"+row(0).ToString+”_”+DateTime.Now.Date.ToString(“dd-MM-yyyy”)"

can someone help me correcting this expression?

Hi @rsugesh,

Can you not use the Write Text File activity?

Regards
Troy

Yes. i can avoid write text file activity. what is the other option to use to save files with different names?

TRy this
“File.Create(“C:\Users\rsugesh\Desktop\”+row(0).ToString+”+“_”+DateTime.Now.Date.ToString(“dd-MM-yyyy”)+“.txt”

HI @rsugesh,
Here i have attached the sample to save the text file with different names.

File : Dynamic Directory.zip (9.0 KB)

Regards
Balamurugan

Thanks Sreekanth. “File.create” seems to be not working in type into activity.

Thanks Bala. I was able to save files with different names using this expression in type into activity “C:\Users\rsugesh\Desktop"+row(0).ToString+”.txt". However, I will try to use your suggestion in other projects.

1 Like