How to Delete All of the Files in a Folder on Powershell


Windows PowerShell is a scripting language built by Microsoft. PowerShell is available on all Windows Operating systems since XP. PowerShell provides access to the cmdlet command or single function tools, providing an easy method to automate administration of the operating system and applications. Simple tasks of copying, moving and deleting files are performed in Powershell. PowerShell programming is excellent for performing tasks repetitively across many computers.

Things You'll Need

  • Windows XP or later
  • PowerShell 1.0 or later
  • Click on the "Start" icon located on the Windows task bar. Then click "Programs," "Accessories" and "Windows PowerShell" to start the PowerShell program.

  • Wait for the window labeled " Windows PowerShell" to appear and a command prompt starting with "PS" to display.

  • Enter the text "Remove-Item c:\directoryname*" and press the "Enter" key. Replace the text "directoryname" with the directory in which your files are located.

  • Type "dir c:\directoryname" and press "Enter" to verify the files were successfully deleted in Step 3.

  • Type "exit" at the Powershell command prompt, and press "Enter" to exit PowerShell.

Related Searches


  • Photo Credit Thinkstock Images/Comstock/Getty Images
Promoted By Zergnet


You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!