Anil_G
(Anil Gorthi)
2
@pprin001
So to get the latest file you can use below
latestfilenumber = Cint(Path.GetFileNameWithoutExtension(Directory.GetFiles("FolderPath","*.csv").OrderByDescending(function(x) Cint(Path.GetFileNameWithoutExtension(x)))(0)))
This will give you the latest number filename in integer format…
Now use (latestfilenumber +1).ToString for the new file
For writing datatable to csv please use write csv activity…
Cheers
1 Like