Hi,
I ran a macro that have created some 1700 odd folders in the main folder. Out of these some folders contain pdf files and some are empty. I need a macro to delete these empty folders.
I tried the below script but nothing seems to be working;
Sub G_Delete_Folder()
'On Error Resume Next
RmDir "S:\profile\3 Payroll\2016-2017\1. Wages\1. Monthly\Payroll" (the folders to be deleted are in 'Payroll' folder)
On Error GoTo 0
MsgBox "All empty folders have been deleted!!"
End Sub
Not sure where I am going wrong. Can someone please help.
Regards,
Vinod
I ran a macro that have created some 1700 odd folders in the main folder. Out of these some folders contain pdf files and some are empty. I need a macro to delete these empty folders.
I tried the below script but nothing seems to be working;
Sub G_Delete_Folder()
'On Error Resume Next
RmDir "S:\profile\3 Payroll\2016-2017\1. Wages\1. Monthly\Payroll" (the folders to be deleted are in 'Payroll' folder)
On Error GoTo 0
MsgBox "All empty folders have been deleted!!"
End Sub
Not sure where I am going wrong. Can someone please help.
Regards,
Vinod