Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

script to delete Temp files ?

Featured Replies


I've shown this before but here again. I can do the pre-fetch but can't find right now...

Creates %systemdrive%\XPtemp.cmd and adds the Registry stuff all in 1 file

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG DELETE %KEY% /f
REG ADD %KEY% /V TITLE /D "Deleteting Temp Internet Files, Cookies, History, Pre-Fetch" /f
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /ve "Cache Killer"
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /v 1 /d "cmd /c \"C:\\XPtemp.cmd\"
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\XPTemps /v 2 /d "cmd /c DEL \"C:\\XPtemp.cmd\"

ECHO Title Delete Temp Internet Files, Cookies, History - Please Wait>%systemdrive%\XPtemp.cmd
ECHO cd %homedrive%%homepath%>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q Recent>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\"Temporary Internet Files">>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\temp>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\cookies>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q "Local Settings"\history>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q cookies>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q temp">>%systemdrive%\XPtemp.cmd
ECHO rd /s/q history>>%systemdrive%\XPtemp.cmd
ECHO rd /s/q UserData>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\"Temporary Internet Files">>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\temp>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\cookies>>%systemdrive%\XPtemp.cmd
ECHO md "Local Settings"\history>>%systemdrive%\XPtemp.cmd
ECHO md Recent>>%systemdrive%\XPtemp.cmd
ECHO md cookies>>%systemdrive%\XPtemp.cmd
ECHO md temp>>%systemdrive%\XPtemp.cmd
ECHO md history>>%systemdrive%\XPtemp.cmd
ECHO md UserData>>%systemdrive%\XPtemp.cmd
REM
REM          C:\Windows Change to your path
ECHO DEL C:\Windows\Prefetch\*.pf>>%systemdrive%\XPtemp.cmd
REM
ECHO EXIT>>%systemdrive%\XPtemp.cmd
EXIT

Run that and reboot. This will do all this probably before you even get logged on unless you have massive Temp stuff.

Edited by maxXPsoft

Added the reg stuff so its all 1 file. Just click and reboot...

On the Prefetch

I've tried adding this but instead of adding to the XPTemp.cmd above

ECHO CD %systemroot\Prefetch>>%systemdrive%\XPtemp.cmd
ECHO for %a in (*.pf) do DEL %a>>%systemdrive%\XPtemp.cmd

Maybe someone else can enlighten us on how to add this to %systemdrive%\XPtemp.cmd?

Probably be simpler to just add DEL C:\Windows\Prefetch\*.pf but some may have different drive or root.

There is no need to delete Prefetch during unattended install... This is adequate operation after running xp for few months...

  • Author

thanks maxXPsoft

i need this script not for one time

i make this

XPtemp.cmd

cmdow @ /HID

@echo off

cmdow @ /HID
@echo off

rd /s/q "%windir%\Prefetch\"
rd /s/q "%userprofile%\Local Settings\Temp\"
rd /s/q "%windir%\Temp\"
rd /s/q "%userprofile%\UserData\"
rd /s/q "%userprofile%\Recent\"

md "%windir%\Prefetch"
md "%userprofile%\Local Settings\Temp"
md "%windir%\Temp"
md "%userprofile%\UserData"
md "%userprofile%\Recent"

EXIT

in registry

;Temp Cleaning
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Cleaning"="C:\\windows\\system32\\XPtemp.cmd"

it is work good :thumbup

thanks

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.