I want to delete file in folder DTA ( Except in folder report)
Please guide me about it.
I want to delete file in folder DTA ( Except in folder report)
Please guide me about it.
Use Assign activity and write as StringVariable = Directory.GetFiles(FolderPath)
Now use For Each Activity, change the Type Arguments to String and pass the StringVariable
Inside that place Delete file activity, FileName as Item.ToString
Hope this will help you
Thanks
Another way use Invoke Code and write as below
Array.ForEach(Directory.GetFiles(FolderPath), Sub(File) File.Delete(File))
Hope this may help you
Thanks
@Srini84 I use this. But show error as below.
How to solve it?
Try as below
Array.ForEach(Directory.GetFiles(FolderPath), Sub(X) File.Delete(X))
Thanks
@Srini84 Same error.
Okay, It think the same namespace is clasing with the Microsoft Sharepoint also
So put as below
Array.ForEach(Directory.GetFiles(FolderPath), Sub(X) System.IO.File.Delete(X))
Thanks
Use delete file activity and pass that file path.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.