Как быстро удалить большую папку в windows 10

On Windows 10, sometimes you need to delete folders containing many files, and using File Explorer can take a long time. The reason is that during the delete process, Windows 10 runs calculations, analyzes, and shows updates as files and folders get deleted on the screen, something that usually takes time when deleting a large folder with thousands of files and subfolders.

However, you can significantly speed up the process to only a few seconds using a few command lines. The only caveat is that you need to be comfortable using Command Prompt.

In this guide, you will learn the fastest way to delete large folders with thousands of files using command lines and the instructions to add an option on the right-click context menu to automate the process with just one click.

  • Delete large folder fast using Command Prompt
  • Delete large folder fast adding context menu option

Warning: Typing the wrong path may delete files in the wrong location, so use these instructions carefully. You have been warned.

Delete large folder fast using Command Prompt

To delete a large number of files on Windows 10 using the del and rmdir commands use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to navigate to the folder that you want to delete and press Enter:

    %USERPROFILE%\path\to\folder

    In the command, change the path to the folder you want to delete.

  4. Type the following command to delete all the files in that folder without showing the output and press Enter:

    del /f/q/s *.* > nul

    In the command, we use the /f option to force the deletion of read-only files. The /q option enables quiet mode. The /s option executes the command for all files inside the folder you’re trying to remove. Using *.* tells the del command to delete every file and > nul disables the console output improving performance and speed.

  5. Type the following command to go back one level in the folder path and press Enter:

    cd..
  6. Type the following command to delete the folder and all its subfolders, and press Enter:

    rmdir /q/s FOLDER-NAME

    In the command, we use the /q switch to enable quiet mode, the /s option to run the command on all the folders and FOLDER-NAME is the variable you need to specify to delete the folder you want.

    Command delete many files fast

Once you complete the steps, all the files and folders in the location will delete quickly from your device.

If you are not comfortable writing commands, you do not usually delete tons of files, or you are just looking for a faster way, it’s possible to add a right-click context menu option that will run a batch file for the data you want to delete.

To add a context menu option that will delete files and folders extremely fast on Windows 10, use these steps:

  1. Open Notepad.

  2. Copy and paste the following lines into the Notepad text file:

    @ECHO OFF
    ECHO Delete Folder: %CD%?
    PAUSE
    SET FOLDER=%CD%
    CD /
    DEL /F/Q/S "%FOLDER%" > NUL
    RMDIR /Q/S "%FOLDER%"
    EXIT
  3. Click on File.

  4. Select the Save As option.

  5. Save the file as quick_delete.bat, and ensure it uses the .bat extension. 

  6. Move the quick_delete.bat file to the C:\Windows folder. (This step is necessary because the file must be on a location with a path environment variable, but you can always create your own if you’re up to the challenge.)

    Windows folder

  7. Open Start.

  8. Search for regedit and click the top result to open the app.

  9. Browse the following path:

    HKEY_CLASSES_ROOT\Directory\shell\

    Quick tip: You can copy and paste the path in the address bar of the Registry to navigate to the path quickly.

  10. Right-click the Shell (folder) key, select New, and click on Key.

    Shell Registry key

  11. Name the key Quick Delete and press Enter.

  12. Right-click the newly created key, select New, and click on Key.

  13. Name the key command and press Enter.

  14. Double-click the command key default String on the right side.

  15. Change the value of the key with the following line and click the OK button.

    cmd /c "cd %1 && quick_delete.bat"

    Command to delete folders and files fast

After you complete the steps, you can right-click a folder and select the Quick Delete option from the context menu to remove a large folder super fast.

While executing the command, you will get a security prompt preventing you from accidentally deleting files. You can always proceed by pressing any key, using the “Ctrl + C” keyboard shortcut, or clicking the “X” button to cancel the operation.

Why You Can Trust Pureinfotech

The author combines expert insights with user-centric guidance, rigorously researching and testing to ensure you receive trustworthy, easy-to-follow tech guides. Review the publishing process.

Удаление больших файлов и папок – это то, с чем нам приходится жить при работе с компьютером под управлением Windows. При удалении больших файлов с помощью File Explorer сначала выполняется сканирование и анализ общего размера элементов или их общего количества, а затем начинается их удаление, при этом все время выдается отчет о проделанной работе.

Этот метод неоправданно расходует системные ресурсы на выдачу отчетов, которые можно было бы потратить на удаление содержимого.

К счастью, теперь можно мгновенно удалять большие файлы и папки, не расходуя системные ресурсы, с помощью командной строки. Если использование командной строки Windows вам не подходит, можно добавить эту опцию в контекстное меню всей ОС Windows и удалять любые файлы и папки, независимо от их размера, практически мгновенно из контекстного меню.

Интересно: Как включить скрытую функцию распознавания текста в приложении Фото на Windows 11

Удаление большого файла или папки из Командной строки

Мы уже обсуждали, как удалять файлы и папки с помощью Командной строки. Однако не все способы предусматривают немедленное удаление; некоторые из них занимают несколько секунд. В следующих шагах мы покажем, как быстро удалить большой файл или папку с помощью Командной строки.

*Примечание: *Приведенные в статье методы удаляют элементы навсегда, после чего файлы и папки невозможно восстановить и найти в корзине.

  1. Нажмите Win + R, чтобы открыть окно Run Command.
  2. Введите «cmd» и нажмите CTRL + Shift + Enter, чтобы открыть командную строку с повышенными привилегиями.
    Для выполнения действий с некоторыми файлами и папками могут потребоваться права администратора.
  3. Теперь с помощью команды CD измените каталог на папку, которую нужно удалить.
    CD /d [PathToFolder]

  4. Теперь выполните следующую команду для удаления всего содержимого этой папки без вывода на экран:
    del /f/q/s *.* > nul

    Команда Del означает удаление, ключ /f – принудительное выполнение команды, а ключ /q – тихий режим, то есть ввод данных пользователем не требуется. Переключатель /s используется для рекурсивного режима, поэтому все вложенные папки и их элементы также будут удалены из текущего каталога. Переключатель *.* используется для выбора всего (любое имя файла и любое расширение файла), а переключатель > nul – для отключения консольного вывода.

В приведенном примере мы поместили файл размером 20 Гб в папку «TestFolder», и для удаления файла этой команде потребовалась почти 1 полная секунда.

Если вы хотите удалить всю папку, то используйте эту команду, заменив переменную на путь к папке:

rmdir /q/s [PathToFolder]

Удаление большой папки из контекстного меню

Если вы не любитель командной строки, то можно включить опцию быстрого удаления прямо в контекстном меню Windows. Таким образом, достаточно щелкнуть правой кнопкой мыши на любом большом файле или папке и быстро удалить его.

Но сначала необходимо выполнить следующие действия, чтобы включить опцию в контекстное меню.

*Примечание: *Этот процесс связан с внесением изменений в реестр Windows. Неправильная настройка критических значений в системном реестре может оказаться фатальной для вашей операционной системы. Поэтому мы настаиваем на создании точки восстановления системы или полной резервной копии образа системы, прежде чем приступать к выполнению этого процесса.

  1. Найдите «Блокнот» в меню Пуск, щелкните его правой кнопкой мыши и выберите «Запуск от имени администратора».«Блокнот» и нажмите кнопку «Сохранить как*».

  2. Вставьте следующий текст:
    @ECHO OFF
    ECHO Delete Folder: %CD%?
    PAUSE
    SET FOLDER=%CD%
    CD /
    DEL /F/Q/S "%FOLDER%" > NUL
    RMDIR /Q/S "%FOLDER%"
    EXIT
  3. Нажмите кнопку Файл, а затем «Сохранить как».

  4. Перейдите по следующему пути для сохранения файла:
    C:\Windows
  5. Установите для параметра «Сохранить как тип» значение «Все файлы».»
  6. Введите имя файла, за которым следует «.bat».
    *Примечание: *Запомните полное имя файла, так как оно понадобится позже.
  7. Нажмите Сохранить.

  8. Нажмите Win + R, чтобы открыть окно Run Command.
  9. введите «regedit» и нажмите Enter.
  10. Перейдите по следующему пути из левой панели:
    Computer\HKEY_CLASSES_ROOT\Directory\shell\
  11. Щелкните правой кнопкой мыши на клавише Shell, разверните New и нажмите Key.

  12. Назовите ключ «Fast Delete».
  13. Щелкните правой кнопкой мыши на ключе «Fast Delete», разверните New и снова щелкните Key. На этот раз назовите ключ «команда».

  14. Дважды щелкните на строковом значении «По умолчанию» в ключе команда, а затем вставьте в поле Значение_данных следующее значение, заменив имя пакетного файла на то, которое было задано в шаге 6.
    cmd /c "cd %1 && [BatchFileName].bat"

  15. Нажмите Ok и перезагрузите компьютер.

Теперь при щелчке правой кнопкой мыши на большой папке вы увидите опцию «Быстрое удаление», которая позволит быстро удалить папку навсегда.

Заключение

Не тратьте свое время и ресурсы системы на удаление элементов значительного размера. Вместо этого воспользуйтесь одним из двух описанных в этой статье способов быстрого удаления больших файлов и папок.

  • Home
  • News
  • The Fastest Ways to Delete a Large Folder on Windows 10/11

The Fastest Ways to Delete a Large Folder on Windows 10/11

By Stella | Follow |
Last Updated

When you’re deleting a folder containing numerous files and a substantial size, it can take a considerable amount of time to completely remove the entire folder. Is it possible to delete large folders more quickly on a Windows computer? In this guide, MiniTool will introduce two methods.

If you delete some files and folders by mistake, you can use MiniTool Power Data Recovery to get them back. This best free data recovery software can help you recover lost and deleted files from all types of data storage devices. If you want to recover a large folder, you can also use this software.

MiniTool Power Data Recovery FreeClick to Download100%Clean & Safe

To safeguard your data, you can use MiniTool ShadowMaker to back up your computer regularly. You can use this software to back up files to an internal hard drive, external hard drive, SD card, and more.

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

Deleting a folder containing numerous large files and subfolders in File Explorer can be time-consuming. That’s because Windows needs to run calculations, analyze, and show updates as files and folders get deleted. The whole process will last for a while.

However, is it possible to delete large folders more quickly?

Of course, you can do it using special methods. In this post, we will introduce two methods:

  • Way 1: Use Command Prompt to make Windows delete large folders fast.
  • Way 2: Add the fast way to the context menu.

Which is the fastest way to delete a large folder? You can just try.

Way 1: Use Command Prompt to Delete Large Folders Faster

You can use the del and rmdir commands to delete a large folder faster. Here is a guide:

  1. Click the search icon on the taskbar and search for cmd.
  2. Right-click Command Prompt from the search result and select Run as administrator from the context menu. This will run Command Prompt as administrator on Windows.
  3. Copy the path of the folder you want to delete.
  4. Type cd path into Command Prompt and press Enter to navigate to the folder that you want to delete. In this step, you need to replace path with the folder path you have copied. For example: cd F:\large folder.
  5. Type del /f/q/s *.* > nul and press Enter.
  6. Type cd.. and press Enter to go back to one level in the folder path.
  7. Type rmdir /q/s foldername and press Enter to delete the folder and all its subfolders.

You can also create a script and modify the related registry key to add a new entry to the right-click context menu to delete large folders faster.

You can use these steps to do this job:

1. Create an empty txt file and open it.

2. Copy and paste the following content to Notepad:

@ECHO OFF

ECHO Delete Folder: %CD%?

PAUSE

SET FOLDER=%CD%

CD /

DEL /F/Q/S “%FOLDER%” > NUL

RMDIR /Q/S “%FOLDER%”

EXIT

3. Go to File > Save.

4. Change the file’s name to quick_delete and change the extension to .bat.

5. Go to C:\Windows, then cut and paste the quick_delete file to this location.

6. Press Windows + R to open Run, then type regedit into the Run box and press Enter to open Registry Editor.

7. Go to this path: HKEY_CLASSES_ROOT\Directory\shell\.

8. Right-click the Shell (folder) key, then go to New > Key.

9. Name the key Fast Delete and press Enter.

10. Right-click the newly created key (the Fast Delete key), then go to New > Key.

11. Name the new key Command.

12. Double-click the default String in Command on the right panel, then enter cmd /c “cd %1 && quick_delete.bat” into the box of Value data.

13. Press OK to save the change.

14. Close Registry Editor.

create a fast delete option

When you want to delete a large folder, you can right-click the target folder and then select Fast Delete from the context menu.

Command Prompt will pop up, asking you to press any key to continue. Just do it.

press any key to continue

Bottom Line

These are the two methods to delete large folders faster on a Windows computer. You can select your preferred one to help you delete large folders more quickly. If you delete folders unexpectedly, you can use MiniTool Power Data Recovery to rescue them.

If you encounter issues when using MiniTool data recovery software, you can contact [email protected] for help.

About The Author

Position: Columnist

Stella has been working in MiniTool Software as an English Editor for more than 8 years. Her articles mainly cover the fields of data recovery including storage media data recovery, phone data recovery, and photo recovery, videos download, partition management, and video & audio format conversions.

The fastest way to delete large folders and files in Windows is to take the command-line approach. You could either do it manually via CMD or create and run a batch file for quick deletion. These two methods are a lot faster than the traditional way of deleting using the Windows Explorer delete option.

But before I go through the superfast way to delete large folders, here’s the reason why it takes so much time. If you are in a hurry, jump to the next section for the solution.

Why Does Windows Take Time to Delete Large Folders?

When you delete huge folders in Windows, you will notice that the process takes quite a bit of time to complete. It is the opposite of fast.

I keep backup folders of gHacks locally on a platter-based drive, and these folders come close to 30 Gigabytes in size with more than 140,000 files and 350 folders.

When I need to delete them again, it takes a long time if I run the delete operation in Windows Explorer. The problem is that Windows prepares to delete first. This includes running calculations first, which, in itself may take a very long time to complete. Then comes the deletion part, even if you choose to delete the folders permanently (force delete).

Then when the actual deleting takes place, Windows analyzes the process and posts updates to the file operation window.

It may take ten or twenty minutes, or even longer, to delete a large folder (of size greater than 10 GB, for instance) from your hard disk using Explorer on Windows devices.

Delete Large Folders in Windows Quickly Using CMD

If you run delete commands from the command line instead, you will notice that the operation completes a lot faster. You may notice that the operation needs just a fraction of the time that the same operation requires when you run it in Explorer.

windows super fast delete large folders

Using CMD in Windows XP/7/10 to delete huge folders

Matt Pilz, who wrote about this back in 2015 saw a reduction from 11 minutes to 29 seconds, which made the command line operation more than 20 times faster than the Explorer option.

The downside to this is that it requires the use of the command line. Matt suggested adding the commands to the Explorer context menu so that users could run them in Explorer directly. This makes it both faster and easier.

The two commands that users require are Del, for deleting files, and Rmdir, for removing directories.

Here’s the step-by-step process to delete large folders using CMD:

  1. Tap on the Windows-key, type cmd.exe and select the result to load the command prompt.
  2. Navigate to the folder that you want to delete (with all its files and subfolders). Use cd path, e.g. cd o:\backups\test\ to do so.
  3. The command DEL /F/Q/S *.* > NUL deletes all files in that folder structure, and omits the output which improves the process further.
  4. Use cd.. to navigate to the parent folder afterwards.
  5. Run the command RMDIR /Q/S foldername to delete the folder and all of its subfolders.

Here are descriptions of each of the commands used above.

DEL /F/Q/S *.* > NUL

  • /F — forces the deletion of read-only files.
  • /Q — enables quiet mode. You are not asked if it is ok to delete files (if you don’t use this, you are asked for any file in the folder, which can be time-consuming and therefore counter-productive).
  • /S — runs the command on all files in any folder under the selected structure.
  • *.* — delete all files.
  • > NUL — disables console output. This improves the process further, shaving off about one quarter of the processing time off of the console command.

RMDIR /Q/S foldername

  • /Q — Quiet mode, won’t prompt for confirmation to delete folders.
  • /S — Run the operation on all folders of the selected path.
  • foldername — The absolute path or relative folder name, e.g. o:/backup/test1 or test1

Method #2: Creating a Batch File for Quick Deletion

If you don’t need to run the command often, you may be perfectly fine running the commands directly from the command prompt.

However, if you do use it frequently, you may prefer to optimize the process. You may add the command to the Explorer context menu so that you can run it from there directly. This saves even more time without depending on a third-party software.

For this, the first thing you need to do is create a batch file. Create a new plain text document on Windows, and paste the following lines of code into it.

@ECHO OFF
ECHO Delete Folder: %CD%?
PAUSE
SET FOLDER=%CD%
CD /
DEL /F/Q/S «%FOLDER%» > NUL
RMDIR /Q/S «%FOLDER%»
EXIT

Save the file as delete.bat afterwards. Make sure it has the .bat extension, and not the .txt extension. You can do this by selecting Save as type as All Files.

The batch file comes with a security prompt. This provides you with an option to stop the process; important if you have selected the context menu item by accident. You can use CTRL-C or click on the x of the window to stop the process. If you press any other key, all folders and files will be deleted without any option to stop the process.

You need to add the batch file to a location that is a PATH-environment variable. While you may create your own variable, you may also move it to a folder that is already supported; e.g.: C:\Windows. In other words, you need to place this .bat file in C:\Windows so that the Windows registry can easily access it.

delete folders quickly

Adding batch file to Windows registry

Do the following to add the new batch file to delete folders quickly to the Windows Explorer context menu. This can be executed in all major versions of Windows including Windows XP, Windows 7, and Windows 10.

  1. Tap on the Windows key, type regedit.exe, and tap in the Enter key to open the Windows Registry Editor.
  2. Confirm the UAC prompt.
  3. Go to HKEY_CLASSES_ROOT\Directory\shell\
  4. Right-click on Shell and select New > Key.
  5. Name the key Fast Delete
  6. Right-click on Fast Delete, and select New > Key.
  7. Name the key command.
  8. Double-click on default of the command key.
  9. Add cmd /c «cd %1 && delete.bat» as the value.
fast delete

Fast Delete option in Windows Explorer context menu

If you want to speed up the deletion process even further, you can always check some third-party tool like byenow.

Summary

Article Name

Delete Large Folders in Windows Superfast Using CMD

Description

Delete large folders on Windows using command line operation. Or create a batch file to quickly delete heavy folders in Windows XP/7/10 via context menu.

Author

Martin Brinkmann

Publisher

Ghacks Technology News

Logo

Advertisement

файлы небольшие — общим весом около 25 гб ,»очистить корзину» не справляются за ночь .

upd: *powershell.exe -command Clear-RecycleBin -Force * висит несколько часов ,очевидного толку нет .


  • Вопрос задан

  • 4306 просмотров

Пригласить эксперта

C:\Windows\System32\cleanmgr.exe
Или просто удалите папку на нужном диске:
rmdir /q /s C:\$RECYCLE.BIN

Попробуйте из командной строки удалять командой
del /f/q *
Я временные папки всегда так чищу (там обычно скапливается куча файлов) — она работает на порядок быстрее, чем проводник.
Удобно запускать команды оболочки из какого-либо файлового менеджера, из Far manager например.

Была та же проблема, и тоже чуть бульше 25гб. Пока искал в интернете, кто сталкивался с такой проблемой, CCleaner всё удалил.

Войдите, чтобы написать ответ


  • Показать ещё
    Загружается…

Минуточку внимания

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Wondershare что это за папка в windows 10
  • Для чего нужен windows search
  • Напоминания на рабочий стол для windows 10
  • Как скрыть папку от других пользователей windows 10
  • Windows 10 22h2 full x64 by flibustier iso