 | | Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks. | Windows 7 - Folder - Delete from Command Prompt
Folder - Delete from Command Prompt How to Delete a Folder from the Command Prompt
Published by Brink
01-16-2010
| Folder - Delete from Command Prompt How to Delete a Folder from the Command Prompt  Information This will show you how to permanently delete a Folder using the RD or RMDIR command from within a command prompt. This can be handy if you cannot delete the folder using the normal methods.  Note While you can run this command in a non-elevated or elevated command prompt, you would get the best results using a elevated command prompt.  Warning The folder will be deleted immediately and not placed in the Recycle Bin first. Deleting a folder using this command will also delete all of it's contents as well as the folder. Be sure to backup anything you want to keep in the folder first. EXAMPLE: RD and RMDIR Command NOTE: You can use either the RD or RMDIR command in the command prompt. They are the same command. Here's How:1. To Use a Elevated Command Prompt in Windows A) Open a Elevated command prompt.
B) Go to step 3. 2. To Use a Command Prompt at Boot A) Open a command prompt at boot.
B) In the command prompt, type diskpart and press Enter. (see screenshot below)
C) In the command prompt, type list volume and press Enter. (see screenshot below) NOTE: This will let you see what the drive letter is for the drive that you want to delete the folder in since it may not always be the same drive letter that it is in Windows.
D) After making note of the drive letter, type exit and press Enter. (see screenshot below)
3. In the command prompt, type the command below and press enter. NOTE: Substitute Full Path of Folder within quotes below with your folder's full path within quotes instead. Code: RD /S /Q "Full Path of Folder" NOTE: For example, if I wanted to delete a folder named Folder on my desktop, I would type this command below. Code: RD /S /Q "C:\Users\UserName\Desktop\Folder"  4. The folder should now be deleted. 5. Close the command prompt. NOTE: If you used a command prompt at boot, then also close the System Recovery Options window and restart the computer. That's it,
Shawn |  Published by | | Administrator Join Date: Oct 2008 Location: Texas Posts: 34,826 | |
 Tutorial Tools | | | | | | | | | |
01-16-2010
|
#1 | | Windows 7 Ultimate (32 bit) |
Bringing back memories from 30 years ago.
I thought everyone know that.
DOS RULEZ! | My System Specs | | System Manufacturer/Model Number Lenovo Desktop H420 OS Windows 7 Ultimate (32 bit) CPU Intel i3 2100 Motherboard Lenovo LGA1155 MB Memory 4GB of DDR3 memory Graphics Card PCI-E NVIDIA GeForce 8500 GT Sound Card Build-in on MB Monitor(s) Displays Samsung 23" HD Model 2333 Screen Resolution 1920x 1080 Keyboard Who needs a keyboard? Mouse Logitech Laser G7 wireless PSU 450 Watt and some fans that blow Case Small tower Cooling Yes I am cool. lol Hard Drives C: Main Drive SATA 250GB
D:Backup Drive 500GB SATA Internet Speed Cable - Down 30 Mbps, UP 12 Mbps Other Info Motorola SB-6120 Cable modem DOC 3
Logitech Pro 9000 webcam |
01-16-2010
|
#2 | | Windows 7 Ultimate x64 SP1 |
Hello Iggy (John  ),
Yeah, we've been having a few folks not being able to delete folders normally, so I thought this could help with that. DOS does rule. | My System Specs | | System Manufacturer/Model Number Self built custom OS Windows 7 Ultimate x64 SP1 CPU Intel i7-980X 3.3 Ghz (3.48 Ghz OC'd) Motherboard ASUS P6X58D Premium Memory 12 GB (2GBx6) DDR3 PC3-16000 2000 MHz Kingston HyperX Graphics Card Sapphire HD5870 Eyefinity 6 2GB Sound Card Realtek HD Audio ALC889 Integrated Chip Monitor(s) Displays 3x 27" Asus VE278Q Screen Resolution 1920x1080 Keyboard Logitech Cordless Desktop MX 5500 Revolution Mouse Logitech Cordless Desktop MX 5500 Revolution PSU OCZ Series Gold OCZZ1000M 1000W Case Corsair Obsidian 800D Cooling Thermalright Ultra 120 Extreme Copper CPU heat sink w/120 MM Hard Drives 160GB OCZ RevoDrive X2
** 2 x 1TB Samsung HDD HD154UI SATA Internet Speed 50 Mb/s Download and 2 Mb/s Upload Other Info Microsoft LifeCam Cinema
** Lite-On iHBS212 12x BD Writer
** Samsung CLX-3175FW Printer
** Netgear WNDR3800 Router
** Motorola SBG6580 Cable Modem
** 2x APC Back-UPS XS 1500 |
02-27-2010
|
#3 | | windows 7 ultimate was Vista home premium |
| My System Specs | | System Manufacturer/Model Number hp pavilion dv9700 OS windows 7 ultimate was Vista home premium Motherboard Quanta 30 d1 Memory 3072 MBs Graphics Card NVIDIA GeForce 7150M / nForce 630M Screen Resolution 1140 x 900 PSU AMD Turion 64 X2 Mobile Technology TL-60 2000 Mhz |
02-27-2010
|
#4 | | MS Windows 7 Ultimate SP1 64-bit |
Guess it's too much to suggest to them:
rd /s /q %userprofile%\desktop\foldername | My System Specs | | System Manufacturer/Model Number Toshiba Satellite L305D laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD Athlon X2 Dual-Core QL-64, 2100 Mhz, 2 Cores Motherboard TOSHIBA Portable PC (Socket M2/S1G1) Memory 4.0GB (2x2GB) DDR2 @ 333MHz 5-5-5-15 Graphics Card ATI Radeon 3100 Graphics (Toshiba) Sound Card Realtek High Definition Audio Monitor(s) Displays Generic PnP Monitor @ 1280x800 Screen Resolution 1280 x 800 Keyboard standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives 125.03GB Corsair CSSD-V128GB2 ATA Device (IDE)
Depending upon testing, organized as 1,2, or 3 partitions with/without a 100mb system partition at the front. Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drives HL-DT-ST DVDRAM GSA-T50N ATA Device
Synaptics PS/2 Port TouchPad
Speakers (Realtek High Definition Audio)
Atheros AR5007EG Wireless Network Adapter
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. |
02-27-2010
|
#5 | | Windows 7 Ultimate x64 SP1 |
Hello Karl,
For only the C:\User\(user-name) location, that would be fine.
I just used the normal full path version since it would be a better example for all situations. Plus, the %path% may not work so well if a command prompt at boot is used. That's all. | My System Specs | | System Manufacturer/Model Number Self built custom OS Windows 7 Ultimate x64 SP1 CPU Intel i7-980X 3.3 Ghz (3.48 Ghz OC'd) Motherboard ASUS P6X58D Premium Memory 12 GB (2GBx6) DDR3 PC3-16000 2000 MHz Kingston HyperX Graphics Card Sapphire HD5870 Eyefinity 6 2GB Sound Card Realtek HD Audio ALC889 Integrated Chip Monitor(s) Displays 3x 27" Asus VE278Q Screen Resolution 1920x1080 Keyboard Logitech Cordless Desktop MX 5500 Revolution Mouse Logitech Cordless Desktop MX 5500 Revolution PSU OCZ Series Gold OCZZ1000M 1000W Case Corsair Obsidian 800D Cooling Thermalright Ultra 120 Extreme Copper CPU heat sink w/120 MM Hard Drives 160GB OCZ RevoDrive X2
** 2 x 1TB Samsung HDD HD154UI SATA Internet Speed 50 Mb/s Download and 2 Mb/s Upload Other Info Microsoft LifeCam Cinema
** Lite-On iHBS212 12x BD Writer
** Samsung CLX-3175FW Printer
** Netgear WNDR3800 Router
** Motorola SBG6580 Cable Modem
** 2x APC Back-UPS XS 1500 |
02-27-2010
|
#6 | | MS Windows 7 Ultimate SP1 64-bit |
Hello Shawn,
I agree.
Karl | My System Specs | | System Manufacturer/Model Number Toshiba Satellite L305D laptop OS MS Windows 7 Ultimate SP1 64-bit CPU AMD Athlon X2 Dual-Core QL-64, 2100 Mhz, 2 Cores Motherboard TOSHIBA Portable PC (Socket M2/S1G1) Memory 4.0GB (2x2GB) DDR2 @ 333MHz 5-5-5-15 Graphics Card ATI Radeon 3100 Graphics (Toshiba) Sound Card Realtek High Definition Audio Monitor(s) Displays Generic PnP Monitor @ 1280x800 Screen Resolution 1280 x 800 Keyboard standard PS/2 Keyboard Mouse HP Wireless Optical Mobile Mouse Model FHA-3410 Hard Drives 125.03GB Corsair CSSD-V128GB2 ATA Device (IDE)
Depending upon testing, organized as 1,2, or 3 partitions with/without a 100mb system partition at the front. Internet Speed What the local pub, local coffee shop offers. Other Info Optical Drives HL-DT-ST DVDRAM GSA-T50N ATA Device
Synaptics PS/2 Port TouchPad
Speakers (Realtek High Definition Audio)
Atheros AR5007EG Wireless Network Adapter
Also have an Asus ha1002xp netbook with Win 7 Ultimate installed. |
05-11-2010
|
#7 | | windows 7 ultimate 64-bit |
great thanks dude.it work 100%  | My System Specs | | OS windows 7 ultimate 64-bit |
05-11-2010
|
#8 | | Windows 7 Ultimate x64 SP1 |
You're most welcome Faridfaiz, and welcome to Seven Forums. | My System Specs | | System Manufacturer/Model Number Self built custom OS Windows 7 Ultimate x64 SP1 CPU Intel i7-980X 3.3 Ghz (3.48 Ghz OC'd) Motherboard ASUS P6X58D Premium Memory 12 GB (2GBx6) DDR3 PC3-16000 2000 MHz Kingston HyperX Graphics Card Sapphire HD5870 Eyefinity 6 2GB Sound Card Realtek HD Audio ALC889 Integrated Chip Monitor(s) Displays 3x 27" Asus VE278Q Screen Resolution 1920x1080 Keyboard Logitech Cordless Desktop MX 5500 Revolution Mouse Logitech Cordless Desktop MX 5500 Revolution PSU OCZ Series Gold OCZZ1000M 1000W Case Corsair Obsidian 800D Cooling Thermalright Ultra 120 Extreme Copper CPU heat sink w/120 MM Hard Drives 160GB OCZ RevoDrive X2
** 2 x 1TB Samsung HDD HD154UI SATA Internet Speed 50 Mb/s Download and 2 Mb/s Upload Other Info Microsoft LifeCam Cinema
** Lite-On iHBS212 12x BD Writer
** Samsung CLX-3175FW Printer
** Netgear WNDR3800 Router
** Motorola SBG6580 Cable Modem
** 2x APC Back-UPS XS 1500 |
05-12-2010
|
#9 | | Windows 7 Ultimate 64-bit |

Quote: Originally Posted by Brink Hello Iggy (John  ),
Yeah, we've been having a few folks not being able to delete folders normally, so I thought this could help with that. DOS does rule.  Arrgh! It's not DOS!!!  If I try anything with Int 21h Windows 7 will not only reprimand me but ship me off to Jersey as well... | My System Specs | | System Manufacturer/Model Number baarod/MCP OS Windows 7 Ultimate 64-bit CPU Core2 Quad Q6600 @ 3.6GHz 9x400FSB Motherboard Gigabyte G33M-S2H Memory 4GB DDR2 1066 Graphics Card ATI Radeon HD 4670 Sound Card Integrated Azalia Monitor(s) Displays Acer AL1711 Screen Resolution 1280x1024 Keyboard Microsoft Wireless Comfort Keyboard 4000 Mouse Microsoft Wireless Lasr Mouse 5000 PSU 240W TFX Case InWin BT566 Cooling Intel Retail Stock Hard Drives OCZ Vertex SATAII w/ 1.5FW 30,528MB system and apps
Maxtor 6L300R0 PATA 286,188MB page file, data and user profiles Internet Speed 3Mbps Verizon DSL over 802.11g Other Info Hauppauge WinTV PVR II Tuner, Generic $13 SoC Webcam, RT61 WiFi with remote antenna, Media Center Remote and Receiver Folder - Delete from Command Prompt problems? All times are GMT -5. The time now is 11:39 PM. |  |