How to delete a folder

How to delete a folder @vikas_reddy_Vicky

there is an activity: File > Delete.
It works for folders as well

2 Likes

it is deleting only empty directory?

Hi @Venkatesh , you can delete empty as well as non-empty directory using File → Delete activity.

I cant delete a folder!!! It only deletes files. HELP PLS!!

Hi,

Do Invoke Code with one of the following lines of VB code - you can pass your folder name as an Argument:

    My.Computer.FileSystem.DeleteDirectory("your folder to delete", FileIO.DeleteDirectoryOption.DeleteAllContents)


    My.Computer.FileSystem.DeleteDirectory("your folder to delete", FileIO.DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)
7 Likes

Thank you so much bro!
It works perfectly :wink: