Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

Command line to delete empty folders Windows 11, 10, ....!


If you want to delete empty folders via command line, here is the command for all Microsoft's Windows 11, 10, ... Desktop and MS Server OS!




1. Hold down the Shift key, right-click a folder

2. Click here Open Command Prompt (or Powershell, or Terminal APP)
(the Command Prompt is open on the current folder)


3. When you are in the Command Prompt in the desired Directory, run the following command line:


for /f "delims=" %d in ('dir /s /b /ad ^| sort /r') do rd "%d"



Note:
You need to make sure that you are running the following command from the exact path of the parent folder where you need to find and remove empty subfolders.

or this: ►  Script to delete!

The Command for Address-Bar in ► Quad-Explore for Windows 11, 10, ... or ► Windows 11, 10, ... File Explorer


cmd /k "for /f "delims=" %d in ('dir /s /b /ad ^| sort /r') do rd "%d""




(Image-1) Example command line to delete empty folders on Windows 11, 10, ....!
Example command line to delete empty folders on Windows 11, 10, ....!

-
▲ Back to the top ▲




FAQ 98: Updated on: 7 August 2021 18:17 Windows
Windows-Console

Delete partition with Diskpart under Windows 11, 10, ... and MS Server!


It is easy to delete a partition with Diskpart on all Windows 11, 10, Desktop and MS Server 2022, 2019, operating systems Contents: 1. Deleting
Windows-Console

Set maximum password age / expiration date via Windows PowerShell!


Set the maximum password age or the expiration date via Windows PowerShell under MS Windows 11, 10, Desktop and MS Server If your computer is running
Windows-Console

Change Windows 11, 10, ... time zone via Terminal, Powershell, command prompt!


Its easy to change Windows 11, 10, or MS Server time zone via Terminal, Powershell, command prompt Changing the Windows time zone is sometimes faster
Windows-Console

Difference Between PowerShell and Command Prompt?


The range of commands and the options are the main difference between PowerShell and the command prompt on Windows 11, 10, and MS Server OS The MS PowerShell
Windows-Console

Connection to remote desktop service via command prompt!


It is easy to start a connection to the Remote Desktop Service via the command prompt with arguments on Windows 11, 10, and MS Server OS   Contents:
Windows-Console

Command line arguments in the command prompt with examples!


For parameters that can be passed when the batch file is called and other variables via the set on Windows 11, 10, and MS Server OS Contents: 1.
Windows-Console

Waiting for keyboard input Command prompt Script?


Often you want to stop the script in the batch file and wait for the user to press Enter, or variables to process on Windows 11, 10, and MS Server OS

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, 11, 10, console, command, line, delete, empty, folders, here, microsoft, desktop, server, Questions, Answers, Software




    

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + StressMyPC
  + DesktopSnowOK
  + Delete.On.Reboot
  + IsMyTouchScreenOK
  + Print.Test.Page.OK
  + OpenCloseDriveEject
  + ColorConsole
  + IsMyLcdOK
  + DesktopDigitalClock
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Windows 2021 | Windows 10 | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2023 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.061


► Disabling Airplane Mode Completely on Windows? ◄

► How can I burn a BIN image file? ◄

► What is the screen resolution of my Windows 11? ◄

This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....