Delete empty files in a folder



I want to delete empty files from a folder. Like empty text file excel file. how it can be achieved.


Use Invoke Code activity and use a code something like below:

Dim info As New FileInfo("C:\Amalendu\Projects\NOV\AMS\Testing Team\Docs\New Text Document.txt")
Dim length As Long = info.Length

If(length = 0)
End If

Now one thing you need to do before it is get all the files inside a directory and loop through those files with the above code.


Hi @Shashi123

Alternative way strictly with UiPath acitivties:
Delete empty files.xaml (8.9 KB)