Einzelnen Beitrag anzeigen

Benutzerbild von Duffy
Duffy

Registriert seit: 19. Mär 2003
Ort: Wuppertal
835 Beiträge
 
Delphi 3 Standard
 
#5

Re: ein Script zum Löschen der Dateien

  Alt 13. Okt 2005, 19:26
Hallo sniper_w,
ich bereinige meine Verzeichnisse mit folgendem Script ...
Code:
@ ECHO OFF
SET ERASE_ANY=No
ECHO *----------------------------------------------------------------------*
:CHECK-~INC-FILES
IF EXIST *.~INC GOTO ERASE_~INC_FILES
GOTO CHECK-~PAS-FILES
:ERASE_~INC_FILES
ECHO * Delete ~INC-Files...                                                *
ERASE *.~INC
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-~PAS-FILES
IF EXIST *.~PAS GOTO ERASE_~PAS_FILES
GOTO CHECK-DCU-FILES
:ERASE_~PAS_FILES
ECHO * Delete ~PAS-Files...                                                *
ERASE *.~PAS
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-DCU-FILES
IF EXIST *.DCU GOTO ERASE_DCU_FILES
GOTO CHECK-DDP-FILES
:ERASE_DCU_FILES
ECHO * Delete DCU-Files...                                                 *
ERASE *.DCU
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-DDP-FILES
IF EXIST *.DDP GOTO ERASE_DDP_FILES
GOTO CHECK-EXE-FILES
:ERASE_DDP_FILES
ECHO * Delete DDP-Files...                                                 *
ERASE *.DDP
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-EXE-FILES
IF EXIST *.EXE GOTO ERASE_EXE_FILES
GOTO CHECK-ERASY-ANY
:ERASE_EXE_FILES
ECHO * Delete EXE-Files...                                                 *
ERASE *.EXE
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-DLL-FILES
IF EXIST *.EXE GOTO ERASE_DLL_FILES
GOTO CHECK-ERASY-ANY
:ERASE_DLL_FILES
ECHO * Delete DLL-Files...                                                 *
ERASE *.DLL
SET ERASE_ANY=Yes
REM *-----------------------------------------------------------------------*
:CHECK-ERASY-ANY
IF %ERASE_ANY%==No GOTO NOTHING_TO_DO
GOTO ENDE
:NOTHING_TO_DO
ECHO * Nothing to do...                                                    *
:ENDE
ECHO *----------------------------------------------------------------------*
SET ERASE_ANY=
Angehängte Dateien
Dateityp: zip erdelprj_646.zip (463 Bytes, 3x aufgerufen)
Künftige Generationen wollen ihre Fehler selber machen.
Jedes Programm wird nie das können, was Du wirklich brauchst.
Das Gegenteil von gut ist gut gemeint
-----
  Mit Zitat antworten Zitat