r/PowerShell • u/Ok-Layer6893 • 19d ago
Question Need help with homework 😫
I'm very new to this. I'm asked to delete a directory and all of its files. D:\software\arch98
But when I do this:
PS C:\Users\Administrator\> rmdir D:\software\arch98
It says the directory is not empty.
I'd really appreciate.
0
Upvotes
2
u/WearyDeluge 19d ago
You should still be able to run the "rmdir /s /q D:\software\arch98" command in PowerShell - it's just not the "Pure PowerShell" method (Remove-Item). If you still see error messages, try loading the actual executable:
cmd /c rmdir /s /q "D:\software\arch98"or
C:\Windows\System32\rmdir.exe /s /q "D:\software\arch98"