Skip to the content
techlogist.nettechlogist.nettechlogist.net
Tips for IT Helpdesks and SysAdmins.
  • Tips & Projects
    • Windows
    • Mac OS
    • Other
  • Cheat sheets
    • Windows
    • Mac OS
    • Other
  • Applications
    • Windows
    • Mac OS
    • Other
  • Script & Terminal
    • KQL
    • Powershell
    • Batch/CMD
  • Websites
    • IT
    • Other
  • About
    • Contact
    • Privacy Policy
    • Terms and Conditions
  • Home
  • Scripts & Terminal
  • Batch/CMD
  • Remove all files and sub-folders in a directory
Remove all files and sub-folders in a directory

Remove all files and sub-folders in a directory

July 14, 2019November 10, 2024

This script shows, not only, how to remove files and folders while keeping the top folder via script, but also shows some basic ways and methods to validate user input and requirements in batch.

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to email a link to a friend (Opens in new window) Email
  • Tips & Projects
    • Windows
    • Mac OS
    • Other
  • Cheat sheets
    • Windows
    • Mac OS
    • Other
  • Applications
    • Windows
    • Mac OS
    • Other
  • Script & Terminal
    • KQL
    • Powershell
    • Batch/CMD
  • Websites
    • IT
    • Other
  • About
    • Contact
    • Privacy Policy
    • Terms and Conditions

techlogist.net is licensed under CC BY-NC-ND 4.0

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy