How can i delete a folder in a folder?

Hi all,

i need to delete all in a folder,in my folder there is a file xlsx ,a folder and a folder zip
How can i delete all?
i try to keep file with Directory.GetFiles(PathInput) in a foreach but it doesn’t work with folder

Could you help me?


Hi @vittoria

Instead of this

Directory.GetFileSystemEntries(PathInput, “*”, SearchOption.AllDirectories)

Hope this will work for you

Thank You :slight_smile:

1 Like

could you help me?

@vittoria I think you have taken wrong variable type

please see the attached workflow

Delete Folders and Files.xaml (5.6 KB)