Hi @RajNa
Thanks for using the MS Q&A Portal and for the question.
-
- Using ADF copy activity i am able to do everything except delete files. How do i delete the files from source once copy is done, is there an option. I need to only delete the source file which is successfully copied.
- Copy activity does not have the ability to delete files after copying.. It is data flow which has the option to delete source file or move it a folder upon successful copy. But copy activity is cheaper than data flow. What you can do now is, you can use another copy activity to copy the files to archive and then a delete activity to delete the file after 2nd copy (to archive) is successful.
- also i need to copy only files which are not updated since last 60 days...so how do i filter only files while copy?
- You can make use of a get meta data activity and use the last modified date option there to pick the files which were last modiefied 60 days ago. Please find below screenshot, where in my case, i am filtering files older than 10 days. I have four files in Azfs container, out of which just two files were last modified 10 days ago.
Expression used
@addDays(formatDateTime(utcNow(),'MM/dd/yyyy'),-10) : Start time UTC
@formatDateTime(utcNow(),'MM/dd/yyyy') : End Time UTC
Set variable is optional, if you want to see how the expression works, you may assign the above expression and see how it brings date.
My output after execution
Hope it helps.
Please let us know for any question.