However, that will delete *everything* (including folders) within the folder, if you only want to delete the FILES, then use this batch file instead:
@ECHO OFF
TITLE File Deleter
SET Directory=c:\directory\to\
CLS
ECHO.
ECHO Deleting all files in %Directory% . . .
DEL "%Directory%\*.*" /q >NUL
PING -n 1 localhost>NUL
CLS
ECHO.
ECHO Complete!
ECHO.
ECHO Press any key to exit . . .
PAUSE>NUL
Then you just change this line:
SET Directory=c:\directory\to\
To specify the directory that you want to delete it's content of...
Make sense? :-)
[r.D]
Main Topics
Browse All Topics





by: DrWarezzPosted on 2005-02-01 at 10:02:51ID: 13195276
Try this:
delete
@ECHO OFF
TITLE File Deleter
SET Directory=c:\directory\to\
CLS
ECHO.
ECHO Deleting all files in %Directory% . . .
RD /S /Q "%Directory%" >NUL
MD "%Directory%"
PING -n 1 localhost>NUL
CLS
ECHO.
ECHO Complete!
ECHO.
ECHO Press any key to exit . . .
PAUSE>NUL
HTH
[r.D]