About 80,200 results
Open links in new tab
  1. How can I recursively delete an entire directory with PowerShell 2.0?

    Kristopher Johnson, I get similar errors with varying tools on Windows 7. It seems that the delete call returns earlier than a file or folder is actually removed, causing trouble sometimes. This …

  2. How to quietly remove a directory with content in PowerShell

    2018 Update In the current version of PowerShell (tested with v5.1 on Windows 10 and Windows 11 in 2023) one can use the simpler Unix syntax rm -R .\DirName to silently delete the …

  3. Delete content of a folder using powershell - Stack Overflow

    Apr 8, 2022 · With your command you are deleting the folder. If you want to delete the content of the folder you need to first get the contents and pipe them into the remove-item command.

  4. powershell - Remove-Item does not delete folder - Stack Overflow

    Feb 28, 2023 · Remove-Item \\wsl.localhost\Debian\home\my_folder_to_delete -Recurse -Force How can I force this delete ? PS: I use powerShell on windows 11 Thank you very much …

  5. PowerShell Delete folder if exists - Stack Overflow

    Feb 17, 2022 · Could you help me again with a powershell script? I want to check if multiple folders exist, if they exist then delete the complete folder. Also provide information if the folder …

  6. What's the fastest way to delete a large folder in Windows?

    418 Using Windows Command Prompt: rmdir /s /q folder Using Powershell: powershell -Command "Remove-Item -LiteralPath 'folder' -Force -Recurse" Note that in more cases del …

  7. Delete files older than 15 days using PowerShell - Stack Overflow

    Jun 16, 2014 · I would like to delete only the files that were created more than 15 days ago in a particular folder. How could I do this using PowerShell?

  8. Delete directory regardless of 260 char limit - Stack Overflow

    May 6, 2013 · I've been looking at workarounds and alternatives but they all revolve around me caring what is in the folder. I was hoping for a more simple solution as I don't really care about …

  9. How to delete folder from Task Scheduler with PowerShell?

    Jul 7, 2019 · However, the folder ("\SomePath\") does not get deleted. While this makes perfect sense, I cannot find any way to delete this empty folder. How do I delete an empty Task …

  10. How can I recursively delete folder with a specific name with …

    Sep 6, 2010 · I can delete files with specific extensions in multiple folders with this: Get-childitem * -include *.scc -recurse | remove-item But I also need to delete folders with a specific name - in …