Andreas Hermle
asked on
Delete jpg-files in nested folders using VBA
Dear Experts:
below code deletes all jpg-files that are located in the Folder names 'Test'
How is this code to be re-written, so that nested folders (subfolders and sub-subfolders etc, i.e C:\Test\Subfolder\etc.) that are located within C:\Test\ are also get worked on.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
below code deletes all jpg-files that are located in the Folder names 'Test'
How is this code to be re-written, so that nested folders (subfolders and sub-subfolders etc, i.e C:\Test\Subfolder\etc.) that are located within C:\Test\ are also get worked on.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Sub Delete_JPG_Files_Folder()
On Error Resume Next
Kill "C:\Test\*.jpg"
On Error GoTo 0
End Sub
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Hi rory,
I am truly impressed! Great job, thank you very much for your professional help.
Saves me lots and lots of time.
Regards, Andreas
I am truly impressed! Great job, thank you very much for your professional help.
Saves me lots and lots of time.
Regards, Andreas
ASKER
I will give a try when I am back at my working place.
Thank you very much for your great help.
Regards, Andreas