Clean command

P

Pebble

Hi to all,
Have used the bat file below from a command prompt with win98SE. I was wondering if/how I could make a similar command for winXP.
Thanks.

c:\windows\smartdrv.exe
deltree /y c:\windows\tempor~1
DELTREE /Y C:\WINDOWS\TEMP\*.*
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
exit
--
* * Pebble in Boulder * *
who would never underestimate the humble floppy
Windows XP Home Edition (build 2600)
1.20 gigahertz Intel Celeron
32 kilobyte primary memory cache
256 kilobyte secondary memory cache
Packard Bell NEC
Board: ECS P6IWF 1.0
Bus Clock: 100 megahertz
BIOS: American Megatrends Inc. 07.00T 10/17/2001
256 Megabytes Installed Memory
 
R

Ronnie Vernon MVP

Possibly, but it will need to be completely rewritten. Many of the those file names, paths and commands have been changed or are no longer available in XP.

Open Help and Support and search for "New ways to use tools" and "Command line reference A to Z".

--

Ronnie Vernon
Microsoft MVP
Windows Shell/User


Hi to all,
Have used the bat file below from a command prompt with win98SE. I was wondering if/how I could make a similar command for winXP.
Thanks.

c:\windows\smartdrv.exe
deltree /y c:\windows\tempor~1
DELTREE /Y C:\WINDOWS\TEMP\*.*
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
exit
--
* * Pebble in Boulder * *
who would never underestimate the humble floppy
Windows XP Home Edition (build 2600)
1.20 gigahertz Intel Celeron
32 kilobyte primary memory cache
256 kilobyte secondary memory cache
Packard Bell NEC
Board: ECS P6IWF 1.0
Bus Clock: 100 megahertz
BIOS: American Megatrends Inc. 07.00T 10/17/2001
256 Megabytes Installed Memory
 
W

Wesley Vogel

Scrap it and start over.

You can't use deltree.

New procedure or reason for obsolescence
The rmdir /s command deletes directories containing files and
subdirectories. For more information about the rmdir command, see Rmdir.

smartdrv does not exist in XP.
Caching for the MS-DOS subsystem is automatic.

Rmdir HELP
Paste the following line into Start | Run and click OK...

hh ntcmds.chm::/rmdir.htm

See also..
New ways to do familiar tasks
hh ntcmds.chm::/dos_diffs.htm

XP works diferently.

Although these folders exist:
c:\windows\tempor~1
C:\WINDOWS\TEMP
c:\windows\cookies

Does not exist in XP:
smartdrv.exe
c:\windows\tmp
c:\windows\history
c:\windows\recent
c:\windows\spool\printers
WIN386.SWP XP uses pagefile.sys instead.

You better also look at:
%userprofile%\local settings\Temporary Internet Files
%userprofile%\local settings\Temporary Internet Files\Content.IE5
%userprofile%\local settings\temp
%userprofile%\Cookies
%userprofile%\Local Settings\History
%userprofile%\Local Settings\History\History.IE5
%userprofile%\Local Settings\History\History.IE5\MSHistsomelongnumber
%userprofile%\recent
%windir%\system32\spool\PRINTERS

I may have missed something. ;-)

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
P

Pebble

Yep, I realised that that particular bat couldn't be run on XP, was just showing what I wanted to do. Am familiar with where 98 stashes temp files and such but am still feeling my way around XP.
Will look into the info you sent, thanks Ronnie and Wesley.
 
D

Doug

Hi to all,
Have used the bat file below from a command prompt with win98SE. I was
wondering if/how I could make a similar command for winXP.
Thanks.

c:\windows\smartdrv.exe
deltree /y c:\windows\tempor~1
DELTREE /Y C:\WINDOWS\TEMP\*.*
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
exit
--

It's already been done for you.

Check http://www.langa.com/newsletters/2002/2002-04-04.htm#2

If you scroll all the way to the bottom you can download a general
"template" batch file that you then edit to reflect the accounts on your
computer. Read the instructions carefully.

My working version looks like this.

@echo off
cls
c:
cd "C:\Documents and Settings\Doug\Local Settings\Temp"
del /q /s /f *.*
cd "C:\Documents and Settings\Doug\Local Settings\Temporary Internet Files
del /q /s /f *.*
cleanmgr /sagerun:99
exit

"cleanmgr /sagerun:99" invokes Disk Cleanup which executes the commands I've
specified using sageset.

Obviously this can be edited to clean up other areas.

--
Doug

I'm not an MVP a VIP nor do I have ESP.
I was just trying to help.
Please use your own best judgment before implementing any suggestions or
advice herein.
No warranty is expressed or implied.
Your mileage may vary.
See store for details. :)

Remove shoes to E-mail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top