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.

Deleting directories after install

Featured Replies

Hi.

Any one know how to delete directories after windows is installed from a batch file? I have searched but have not found anything :no:

Some of the directories i want to delete are from some silent application installs which has left some directories, most of them have '.tmp' at the end so i would like to be able to search for directories like these and then delete them.

Many Thanks for any help.

Worf


Here's an excerpt from my one of my own scripts.

REM DELETE SHORTCUTS
DEL /F /Q "%AllUsersProfile%\Start Menu\Set Program Access and Defaults.lnk">NUL
DEL /F /Q "%AllUsersProfile%\Start Menu\Windows Catalog.lnk">NUL
DEL /F /Q "%AllUsersProfile%\Start Menu\Windows Update.lnk">NUL
DEL /F /Q "%UserProfile%\Start Menu\Programs\Accessories\Tour Windows XP.lnk">NUL

REM DELETE FOLDERS
RD /S /Q "%AllUsersProfile%\Start Menu\Programs\Powertoys for Windows XP">NUL
RD /S /Q "%UserProfile%\Start Menu\Programs\Powertoys for Windows XP">NUL
RD /S /Q "%ProgramFiles%\Common Files\Services">NUL
RD /S /Q "%ProgramFiles%\Online Services">NUL
RD /S /Q "%SystemRoot%\$Nt*$">NUL
RD /S /Q "%SystemRoot%\setup.pss">NUL

REM DELETE SAMPLE CONTENT
DEL /F /S /Q "%UserProfile%\My Documents\My Music">NUL
DEL /F /S /Q "%UserProfile%\My Documents\My Pictures">NUL
DEL /F /S /Q "%UserProfile%\My Documents\My Videos">NUL

REM DELETE FAVORITES
DEL /F /S /Q "%SystemDrive%\Documents and Settings\Default User\Favorites">NUL
DEL /F /S /Q "%UserProfile%\Favorites">NUL

REM DELETE FILES
DEL /F /S /Q "%SystemDrive%\clock.avi">NUL
DEL /F /S /Q "%SystemDrive%\swtchbrd.bmp">NUL
DEL /F /S /Q "%SystemDrive%\yahoo.bmp">NUL

REM DELETE TEMPORARY FILES
DEL /F /S /Q %SystemDrive%\~*.*>NUL
DEL /F /S /Q %SystemDrive%\*.~~~>NUL
DEL /F /S /Q %SystemDrive%\*.~m~>NUL
DEL /F /S /Q %SystemDrive%\*.###>NUL
DEL /F /S /Q %SystemDrive%\*.$$$>NUL
DEL /F /S /Q %SystemDrive%\*.--->NUL
DEL /F /S /Q %SystemDrive%\*._mp>NUL
DEL /F /S /Q %SystemDrive%\*.bk!>NUL
DEL /F /S /Q %SystemDrive%\*.tmp>NUL
DEL /F /S /Q %SystemRoot%\*.bak>NUL
DEL /F /S /Q %SystemRoot%\*.log>NUL
DEL /F /S /Q %SystemRoot%\TEMP>NUL

Hope this gives you good start :)

  • Author

Thanks Arie Sure does gives me a good start, will try them out.

rd /S /Q "C:\folder"

that deletes them, the /S is for removing them even if they have data/subfolders in them

this website is handy :)http://www.ss64.com/nt/index.html

Edited by bledd

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.