For file deletion, I wrote following simple batch file which deleted all .pdf's recursively:
del /s /q "\\ad1pfrtg001\AppDev\ResultLogs\*.pdf"
del /s /q "\\ad1pfrtg001\Project\AppData\*.pdf"
Even for the local directory we can use it as:
del /s /q "C:\Project\*.pdf"
The same can be applied for directory deletion where we just need to change del with rmdir.