How to delete all files and folders in a folder. But folder should be there

Hai all,
I have folder name ABC… ABC folder is having files as well as folders inside. I need to delete all files and folders but ABC folder should not get deleted. ABC folder is present in Local machine path eg- c:\ABC

Please help me out. Thanks in advance


can you try with this?


HI @cbhavana

Use Delete File activity


Check out the Video link


@Gokul001 this will deletes only files in folder …i need to delete folders as well

you could use the delete folder activity to delete folders
Check out this video for one line code

Check out this video @cbhavana

Hello @cbhavana

If you are trying to delete all the files and subfolders, it would be better to delete that folder and create a new folder with the same name. Any issues with that?