General discussion

Locked

How can I improve these batch files?

By Man@Large ·
I have 2 batch files in my Autoexec.bat file to clean-up TEMP & Recent files at Boot-up.
@ECHO OFF
SET TMP=C:\WINDOWS\TEMP
SET TEMP=C:\WINDOWS\TEMP
IF EXIST C:\WINDOWS\TEMP\*.* DELTREE /Y C:\WINDOWS\TEMP\*.*
SET RECENT=C:\WINDOWS\RecentIF EXIST C:\WINDOWS\Recent\*.* DELTREE /Y C:\WINDOWS\Recent\*.*
Both files work great, but is there a way to hide what the batch files are deleting? In trying to hide my work, I now can see all of these deletions during boot-up. Also, is there a good website to learn more batch files?

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How can I improve these batch files?

by dmiles In reply to How can I improve these b ...

You can try software like KIXtartused to processing logon scripts.
Technet.microsoft.com
Microsoft Knowledge Base-support.microsoft.com
Microsoft's scripting Web Page:
msdn.microsoft.com/scripting/default.htm
www.windowsnt.digital.com/products/software/entsw

Collapse -

How can I improve these batch files?

by Man@Large In reply to How can I improve these b ...

Sorry, I'm not familiar with Scripts, YET.

Collapse -

How can I improve these batch files?

by SyscoKid In reply to How can I improve these b ...

I don't know, I put those lines in my autoexec.bat in Win 98 and I didn't see any echo to the screen.

But here's a good site to look at:http://home7.inet.tele.dk/batfiles/

Collapse -

How can I improve these batch files?

by Man@Large In reply to How can I improve these b ...

Thanks, this looks like a great site for batch file learning.

Collapse -

How can I improve these batch files?

by rogerndgreen In reply to How can I improve these b ...

You can always re-direct the output to the NUL device

eg IF EXIST C:\WINDOWS\TEMP\*.* DELTREE /Y C:\WINDOWS\TEMP\*.* >NUL

Or, if you have a whole section you don't want on screen, start the section with the line
CTTY NUL
and then end it with
CTTY CON

e.g.
CTTY NUL
echo "this bit won't display on screen"
CTTY CON
echo "this bit will display on screen"

As for a website, try starting at http://www.computing.net/

HTH
Roger

Collapse -

How can I improve these batch files?

by Man@Large In reply to How can I improve these b ...

Thanks, I used the >NUL after the execute lines and it worked. I tried the web site, but didn't find much on batch files.

Back to Windows Forum
6 total posts (Page 1 of 1)  

Operating Systems Forums