I am configuring Jenkins, and when the check out is performed, I need 2 folders to be deleted. I have created the script, which deletes all the bin folder. However, I want to delete all obj folder too.
Get-ChildItem -path C:\testFolderCheck 'obj' -Recurse -force |
Remove-Item -force -Recurse
Get-ChildItem -path C:\testFolderCheck 'bin' -Recurse -force |
Remove-Item -force -Recurse
When I am executing this scripts, only the bin folder is getting deleted. Is there any way of executing both scripts in one run?