29.01.2014, 17:46
Hallo SB,
habe aus langeweile mal eine batch Datei erstellt, welche einfach und schnell dateien eines Typs in einem Ordner löscht.
Was sagt ihr zu dem Code? Dies ist die erste batch datei die ich erstellt habe.
habe aus langeweile mal eine batch Datei erstellt, welche einfach und schnell dateien eines Typs in einem Ordner löscht.
Was sagt ihr zu dem Code? Dies ist die erste batch datei die ich erstellt habe.
PHP-Code:
:: FILE REMOVER v2 BY EMPTYX ::
@echo off
title FILE REMOVER V 2.1 BY EMPTYX
color 0A
goto :home
:home
cls
echo ========================
echo FILE REMOVER BY EMPTYX
echo ========================
echo [1] .RAR [2] .ZIP
echo [3] .DLC [4] .MP3
echo [5] .MKV [6] .ALL
echo [7] EXIT [8] INFO
echo.
echo WHICH FILES DO YOU WANT TO REMOVE?
echo.
echo.
SET choice=
SET /p choice=
IF '%choice%' == '1' GOTO :rar
IF '%choice%' == '2' GOTO :zip
IF '%choice%' == '3' GOTO :dlc
IF '%choice%' == '4' GOTO :mp3
IF '%choice%' == '5' GOTO :mkv
IF '%choice%' == '6' GOTO :all
IF '%choice%' == '7' exit
IF '%choice%' == '8' goto :info
echo ERROR
timeout /t 3
goto :home
:rar
echo You have chosen to delete all .RAR files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.rar
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:zip
echo You have chosen to delete all .ZIP files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.zip
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:dlc
echo You have chosen to delete all .DLC files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.dlc
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:mp3
echo You have chosen to delete all .MP3 files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.mp3
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:mkv
echo You have chosen to delete all .MKV files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.mkv
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:all
msg * You have chosen to delete ALL files.
set /P a=Are you sure? [Y/N]?
if /I "%a%" EQu "Y" DEL *.*
if /I "%a%" EQu "Y" echo All files have been deleted!
if /I "%a%" EQU "N" echo Canceled
goto :backtostart
:backtostart
echo.
echo.
set /P a=Back to start? [Y/N]?
if /I "%a%" EQu "Y" goto :home
if /I "%a%" EQU "N" exit
:info
cls
echo Name: File-Remover
echo Made by: EmPtyX
echo Info: The File Remover was created to remove files easily, fast and permanent. You can edit the code to your needs if you want.
echo Version: 2.1
goto :backtostart
MFG