Deleting the files and directories of an directory

balubeto

Member
Member
Messages
173
Hi

With the Command Prompt in Windows 8.x, which command should I use to delete all files and all subdirectories of a directory without deleting this root directory?

Thanks

Bye
 

My Computer

System One

  • OS
    Windows 8
del "C:\$Recycle.bin\*" /s /f /q
del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\*" /s /f /q

It will delete all files within folder and subdirectories, but not subdirectories themself.
 

My Computer

System One

  • OS
    Win 8.1.1 Pro x64
    Computer type
    Laptop
    System Manufacturer/Model
    Lenovo E525
    CPU
    AMD A4-3300M @ 2,0GHz
    Memory
    6GB DDR3 1333MHz
    Graphics Card(s)
    AMD Radeon HD 6480G 512MB shared
    Sound Card
    Creative Sound Blaster X-Fi Surround 5.1
    Screen Resolution
    1366x768
    Hard Drives
    WD 465GB
    Cooling
    Fusion Tweaker
    Keyboard
    Logitech K360
    Mouse
    Logitech M705
    Internet Speed
    50/50 MBps
    Browser
    Yandex
    Antivirus
    No AV & No Firewall
    Other Info
    Headphones: Sennheiser RS170
del "C:\$Recycle.bin\*" /s /f /q
del "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\*" /s /f /q

It will delete all files within folder and subdirectories, but not subdirectories themself.

I have tried in this way but it does not work because all files are deleted but its nested subdirectories are not deleted. Why?

Thanks

Bye
 

My Computer

System One

  • OS
    Windows 8
Back
Top