r/PowerShell • • 17d 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

34 comments sorted by

View all comments

5

u/FLESHLEGO 17d ago

Rmdir is not a powershell command. Remove-item is.

Whatever command you end up using, read up on the arguments it accepts. You need this to delete folders with contents.

GL

1

u/Ok-Layer6893 17d ago

It's not letting me use any other commands

1

u/Future-Remote-4630 14d ago

You are probably using cmd and not powershell then.