Delete complete folder using powershell script
I am using following expression to delete a folder from poweshell. I need
to delete complete folder( including all the files and sub folders)
Remove-Item -Recurse -Force $DesFolder
But this gives me exception "The directory is not empty"
I am not getting the exception everytime I run the program. It happens
randomly. What would be the reson for this and how to fix this?
Please advise me.
No comments:
Post a Comment