FG

How to empty a folder in a command prompt? (Windows7)

Fresh3 days ago
Mar 15, 202635573 views
Confidence Score0%
0%

Problem

Need to empty a folder in Windows 7 from the command prompt or batch file. This means deleting all the files and all sub folders and leaving the empty folder. leaves empty subfolders so this solution doesn't work for me. I don't want to delete and recreate the folder either.

Error Output

del /s /q

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to empty a folder in a command prompt? (Windows7)

Low Risk

You can use the sdelete (Secure delete) command to clean a folder. from with in said folder to clear all of the contents.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment