Save attachement and erase older file

Hello,

I’m using save attachment and i’m saving in a folder, the problem is that i must only keep only one exemple from the each download, the activity does the following treatment:
if a file “AAA.pdf” had been downloaded, in the next run it will rename the file “AAA(1).pdf”, i want to keep the last saved one

Why dont you clean before your next run?
You can use a file Delete activity in the beginning of your process.

1 Like

thank you, one question how to get directory files into and theire creation date into a datatable?

Please close this thread marking answer as solution to your initial question.

you can use Directory.GetFiles will give you array of strings
then you can convert your string to datatable(see below thread)

1 Like