Powershell command to remove folder and files within

Hi

I use this simple remove-item c:\abc -recurse to remove the folder abc and all files within this folder. I get the error message Cannot remove the item at 'c:\abc' because it is in use.

I am not sure why I am getting this error. I can delete the folder from GUI or file explorer. is there a way to force to delete the folder?

July 21st, 2015 8:26pm

Simple...

cd \
remove-item c:\abc -Force

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 8:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics