Saving text files to drive with different names

activities

#1

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?


#2

Hi @rsugesh,

Can you not use the Write Text File activity?

Regards
Troy


#3

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


#4

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


#5

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


#6

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


#7

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.