You are not logged in.
Pages: 1
Hopefully this program helpful to you.
Hopefully some expert here can help me improve with the integrity of this program.
Hopefully some expert here can show me in any way to make some useful program in the future.
Do you think this is helpful ? comments ?
==================================================================================
@echo off
echo.
echo. Deleting files in Local temp and local CrashDumps !
echo.
echo. Hit any key to continue deletion.....
pause>nul
pushd %LOCALAPPDATA%\Temp
del /Q *
pushd %LOCALAPPDATA%\CrashDumps
del /Q *
pushd %programfiles(x86)%\Google\CrashReports
del /Q *.dmp
pause
==================================================================================
==================================================================================
*Disclaimer: no hater will be entertained. Only positive criticism will be entertained. Thank you.
==================================================================================
Detour in life always surprise people.
Offline
You code can delete files that are not intended, if the pushd fails or if there are spaces in the path - which will cause the pushd to fail.
The files in whichever folder is the current directory would be deleted.
Specifying the path is always safest - or use errorlevel tests with pushd
@echo off
pushd "c:\my folder" 2>nul && (del *.txt & pause & goto :eof)
The *.*? will suppress a prompt asking if you are sure that you wish to delete the files.
This can be done other ways in modern windows but the *.*? method works for older Windows too.
This is untested:
@echo off
echo.
echo. Deleting files in Local temp and local CrashDumps !
echo.
echo. Hit any key to continue deletion.....
pause>nul
del /Q "%LOCALAPPDATA%\Temp\*.*?" "%LOCALAPPDATA%\CrashDumps\*.*?" "%programfiles(x86)%\Google\CrashReports\*.dmp"
pause
Offline
Hey Foxidrive, Thanks for your comments anyway... xD
i'm sure i'm gained something from you here. Thanks !
Keep in touch !
Detour in life always surprise people.
Offline
Pages: 1