Hey @Harshavardhan
Directory.Delete Method (path, recursive)
Deletes the specified directory and, if indicated, any subdirectories and files in the directory
Parameters
path
Type: System.String
The name of the directory to remove.
recursive
Type: System.Boolean
true to remove directories, subdirectories, and files in path; otherwise, false.
Note- If you will not pass Recursive parameter and if directory(which you are deleting , is not an empty then it will throw Error that directory is not empty. only when you are not Deleting files within a for each iteration.
Here i am attaching three things in a workflow
- Delete a directory by using For each , one by one.
- Delete a directory all files only by using for -each. one by one.
- Delete a directory and its sub-directory in a single shot
*All above I have used Invoke method
directory Delete.xaml (9.4 KB)
Regards…!!
Aksh