Delete 1.0.1
@ echo off
color 0a
cls
Title Delete
:strt
set /p delfile="Name file to be deleted(type "0" to quit):"
if %delfile%==0 goto :eof
if not %delfile%==0 goto :cont
:cont
set /p upl="Extension(e.g. "txt"or "wav" (do NOT type ".wav" but "wav")):"
set /p path="Set the path where the file can be found(0 for desktop)"
if %path%==0 goto :delfileondesk
if not %path%==0 goto :delelse
:delfileondesk
if exist %delfile%.%upl% del %delfile%.%upl% && echo File %delfile%.%upl% succesfully deleted && pause>nul && goto :strt
if not exist %delfile%.%upl% echo file %delfile%.%upl% cannot be found && pause>nul && goto :strt
:delelse
if exist %path%\%delfile%.%upl% del %path%\%delfile%.%upl% && echo File %path%\%delfile%.%upl% succesfully deleted && pause>nul && goto :strt
if not exist %path%\%delfile%.%upl% echo file %path%\%delfile%.%upl% cannot be found && pause>nul && goto :strt
so that's it, i am still going to implent a function that knows when something is not delted to say that it is not deleted….i'll post it here than. I think it is as optimized as it can be, but any suggestion or critic is welcome!
Matthias
