{"id":809,"date":"2020-05-01T16:33:00","date_gmt":"2020-05-01T16:33:00","guid":{"rendered":"https:\/\/eter.info\/?p=809"},"modified":"2020-11-15T16:30:26","modified_gmt":"2020-11-15T16:30:26","slug":"delete-large-folder-fast-using-command-prompt","status":"publish","type":"post","link":"https:\/\/domadom.net\/?p=809","title":{"rendered":"Delete large folder fast using Command Prompt"},"content":{"rendered":"\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-pureinfotech-windows-10-tips-one-step-at-a-time\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"0dV2mNURBG\"><a href=\"https:\/\/pureinfotech.com\/delete-large-folder-fast-windows-10\/\">How to delete large folder extremely fast on Windows 10<\/a><\/blockquote><iframe loading=\"lazy\" title=\"&#8220;How to delete large folder extremely fast on Windows 10&#8221; &#8212; Pureinfotech \u2022 Windows 10 tips, one step at a time\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/pureinfotech.com\/delete-large-folder-fast-windows-10\/embed\/#?secret=0dV2mNURBG\" data-secret=\"0dV2mNURBG\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Open&nbsp;<strong>Start&nbsp;<\/strong>on Windows 10.<\/p>\n\n\n\n<p>Search for&nbsp;<strong>Command Prompt<\/strong>, right-click the result, and select the&nbsp;<strong>Run as administrator&nbsp;<\/strong>option.<br>Type the following command to navigate to the folder that you want to delete and press&nbsp;<strong>Enter<\/strong>: <\/p>\n\n\n\n<p><code>%USERPROFILE%\\path\\to\\folder<\/code>.<\/p>\n\n\n\n<p>In the command, make sure to update path with the path to the folder that you want to delete.<br>Type the following command to delete all the files in that folder without showing the output and press&nbsp;<strong>Enter<\/strong>:<\/p>\n\n\n\n<p><strong>del \/f\/q\/s *.* &gt; nul<\/strong><\/p>\n\n\n\n<p>The above command, we use the&nbsp;<strong>\/f<\/strong>&nbsp;switch to force the deletion of read-only files. The&nbsp;<strong>\/q<\/strong>&nbsp;switch enables quiet mode. The&nbsp;<strong>\/s<\/strong>&nbsp;switch executes the command for all files in any folder inside the folder you\u2019re trying to remove. Using&nbsp;<strong>*.*<\/strong>&nbsp;tells the del command to delete every file, and&nbsp;<strong>&gt; nul<\/strong>&nbsp;disables the console output improving performance and speed.<br>Type the following command to go back one level in the folder path and press&nbsp;<strong>Enter<\/strong>:<\/p>\n\n\n\n<p><strong>cd..<\/strong><\/p>\n\n\n\n<p>Type the following command to delete the folder and all its subfolders and press&nbsp;<strong>Enter<\/strong>:<\/p>\n\n\n\n<p><strong>rmdir \/q\/s your-folder-name<\/strong><\/p>\n\n\n\n<p>The above command, we use the&nbsp;<strong>\/q<\/strong>&nbsp;switch to enable quiet mode, the&nbsp;<strong>\/s<\/strong>&nbsp;switch to run the command on all the folders, and&nbsp;<strong>your-folder-name<\/strong>&nbsp;is the variable you need to specify to delete the folder you want.Del and rmdir commands.<br>Once you complete the steps, all the files and folders in the location will delete quickly from your device.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"delete_large_folder_fast_context_menu\">How to delete large folder fast adding context menu option<\/h2>\n\n\n\n<p>If the command lines aren\u2019t your thing, you don\u2019t usually delete tons of files, or you\u2019re just looking for a faster way, it\u2019s possible to add a right-click context menu option that will run batch file for the data you want to delete.<ins><\/ins><\/p>\n\n\n\n<p>Use these steps to add a context menu option that will delete files and folder extremely fast:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open&nbsp;<strong>Notepad<\/strong>.<\/li><li>Copy and paste the following lines into the Notepad text file:@ECHO OFF\nECHO Delete Folder: %CD%?\nPAUSE\nSET FOLDER=%CD%\nCD \/\nDEL \/F\/Q\/S &#8220;%FOLDER%&#8221; &gt; NUL\nRMDIR \/Q\/S &#8220;%FOLDER%&#8221;\nEXIT<\/li><li>Click on&nbsp;<strong>File.<\/strong><\/li><li>Select the&nbsp;<strong>Save As<\/strong>&nbsp;option.<\/li><li>Save the file as&nbsp;<strong>quick_delete.bat<\/strong>, but make absolutely sure it uses the&nbsp;<strong>.bat<\/strong>&nbsp;extension. (If you save it with an&nbsp;<strong>.txt<\/strong>&nbsp;extension, this will not work.)<\/li><li>Move the&nbsp;<strong>quick_delete.bat<\/strong>&nbsp;file to the&nbsp;<code>C:\\Windows<\/code>&nbsp;folder. (This step is necessary, because the file need to be on a location that has a path environment variable, but you can always create your own if you\u2019re up to the challenge.)Windows folder<\/li><li>Open&nbsp;<strong>Start<\/strong>.<\/li><li>Search for&nbsp;<strong>regedit&nbsp;<\/strong>and click the top result to open the app.<\/li><li>Browse the following path:HKEY_CLASSES_ROOT\\Directory\\shell\\<strong>Quick tip:<\/strong>&nbsp;You can copy and paste the path in the address bar of the Registry to quickly navigate to the path.<\/li><li>Right-click the&nbsp;<strong>Shell<\/strong>&nbsp;(folder) key, and select&nbsp;<strong>New<\/strong>&nbsp;and click&nbsp;<strong>Key<\/strong>.Shell Registry key<\/li><li>Name the key&nbsp;<strong>Quick Delete<\/strong>&nbsp;and press&nbsp;<strong>Enter<\/strong>.<\/li><li>Right-click the newly created key, select&nbsp;<strong>New<\/strong>&nbsp;and click&nbsp;<strong>Key<\/strong>.<\/li><li>Name the key&nbsp;<strong>command<\/strong>&nbsp;and press&nbsp;<strong>Enter<\/strong>.<\/li><li>Double-click the&nbsp;<strong>command<\/strong>&nbsp;key default&nbsp;<strong>String<\/strong>&nbsp;on the right side.<\/li><li>Change the value of the key with the following line and click the&nbsp;<strong>OK&nbsp;<\/strong>button.cmd \/c &#8220;cd %1 &amp;&amp; quick_delete.bat&#8221;Command to delete folders and files fast<\/li><\/ol>\n\n\n\n<p>Once you\u2019ve completed the steps, you can right-click a folder and select the&nbsp;<strong>Quick Delete<\/strong>&nbsp;option to remove a large folder super fast.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i3g4v6w8.stackpathcdn.com\/wp-content\/uploads\/2017\/08\/context-menu-quick-delete-1.jpg\" alt=\"Context menu with new Quick Delete option\" class=\"wp-image-91191\"\/><figcaption>Context menu with new Quick Delete option<\/figcaption><\/figure>\n\n\n\n<p>While executing command you\u2019ll get a security prompt which will prevent you from deleting files by accident. You can then press any key to proceed, or use the&nbsp;<strong>Ctrl + C<\/strong>&nbsp;keyboard shortcut or click the&nbsp;<strong>X<\/strong>&nbsp;button to cancel the operation.<\/p>\n\n\n\n<p><strong>Update September 26, 2019:<\/strong>&nbsp;This guide was originally published in August 2017, and it\u2019s been revised for the latest version of Windows 10.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open&nbsp;Start&nbsp;on Windows 10. Search for&nbsp;Command Prompt, right-click the result, and select the&nbsp;Run as administrator&nbsp;option.Type the following command to navigate to the folder that you want to delete and press&nbsp;Enter: %USERPROFILE%\\path\\to\\folder. In the command, make sure to update path with the path to the folder that you want to delete.Type the following command to delete all [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":807,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[31],"tags":[],"class_list":["post-809","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/domadom.net\/wp-content\/uploads\/2019\/10\/DeleteFiles_cmd.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6IZlK-d3","_links":{"self":[{"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/posts\/809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/domadom.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=809"}],"version-history":[{"count":3,"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/posts\/809\/revisions"}],"predecessor-version":[{"id":864,"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/posts\/809\/revisions\/864"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/domadom.net\/index.php?rest_route=\/wp\/v2\/media\/807"}],"wp:attachment":[{"href":"https:\/\/domadom.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/domadom.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/domadom.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}