We help IT Professionals succeed at work.
Get Started

Batch File Help - Suppress RD to show progress bar.

1,180 Views
Last Modified: 2013-11-10
So what im trying to do is run these:

cd %SYSTEMDrive%\
RD /s /q "%WINDIR%\Prefetch"
RD /s /q "%TEMP%"
RD /s /q "%USERPROFILE%\Local Settings\Temp"
RD /s /q "%USERPROFILE%\Local Settings\Temporary Internet Files"
RD /s /q "%USERPROFILE%\Cookies"
RD /s /q "%SystemRoot%\Downloaded Program Files"
RD /s /q "%SystemRoot%\Temp"
RD /s /q "%SystemRoot%\tmp"
REM  ---Super File Cleaner
del /f /s /q %SystemDrive%\*.log
del /f /s /q %SystemDrive%\~*.*
del /f /s /q %SystemDrive%\*.tmp
del /f /s /q %SystemDrive%\*.bak
del /f /s /q %SystemDrive%\*.old
REM  ---END of Super File Cleaner
RD /s /q "C:\$Recycle.bin"

Open in new window


But some how display this:

@echo off
setlocal enabledelayedexpansion
echo.
echo.
set i=0
(Set /P j=Now Cleaning your System) < NUL
ECHO.
ECHO.
(Set /P j= ) < NUL

:start
call :show %i%

:put the command in the next line

set /a i = i + 2
if /i %i% leq 100 goto start
ECHO.
ECHO.
(Set /P j=Your System is now Clean) < NUL
ECHO.
PAUSE>NUL
goto :EOF

:show
(Set /P j=Û) < NUL
title %1%% Done
exit /b
endlocal

Open in new window


1) can it be done?
2) is there a better way?

Thank you for your help in advanced.

Any suggestions would be greatly appreciated.
Comment
Watch Question
"Batchelor", Developer and EE Topic Advisor
CERTIFIED EXPERT
Top Expert 2015
Commented:
This problem has been solved!
Unlock 2 Answers and 17 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE