PowerShell del
del is an alias to the Remove-Item cmdlet and you can use it pretty much like you did in a DOS shell. But there are some additions. It can delete more than just files and directories. It can now delete certificates, registry keys, aliases and more.
One of the nicest features is that you can issue a del command with the -whatif parameter and it won’t run the command, but will tell you what would be deleted if you really did issue the command. So del *.zip -whatif would give you a list of .zip files in your current directory, but wouldn’t actually delete them.
If you haven’t tried PowerShell yet and you work from the command line a lot, you really should check it out. It is a pretty easy transition from cmd.exe, but there is way more power under the hood if you want to dig deeper.
I’ll likely blog more on PowerShell in the future and will link to many of the resources out on the web to help you learn how to use it.
In case you do not already know, there is a great podcast on Powershell called the Power Scripting Podcast. http://powerscripting.wordpress.com/
Rhonda Tipton
March 26, 2008 at 8:52 am
Rhonda, I listen to that whenever I can. I liked the interview they just did with Jeffery Snover.
Chris Sutton
March 26, 2008 at 11:15 am