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.

cleanup.cmd not working

Featured Replies

Hi

I have some problems with my cleanup.cmd.

I want to delete all files in the %TEMP% (%tmp%) directory... and it does not work :

cmdow @ /HID

shutdown.exe -r -f -t 90 -c "Reboot..."

DEL /S /Q "%windir%\Temp\" //deleting windows temp : ok

DEL /S /Q "%TMP%" // deleting current user's (administrator) temp : Not working

DEL /S /Q "%TEMP%" //same

exit

When i try to do the same commands under xp it works :/


Well not sure... but the main difference between your first command and the 2 other one.... is the final \ added to the end of the command.....

Did you tried it?

  • Author
try: Del /S "%TEMP%" /Q and: Del /S "%TMP%" /Q

i'll try but i dont see the difference between /s /q and /s file /q

try

RD /s/q "%temp%"
RD /s/q "%windir%\Temp\"
MD "%temp%"
MD "%windir%\Temp"

Because.....

In the commands before it, the directories have been removed, therfore, new empty ones are created in their place.

You don't delete a directory, you remove them. If you want another option, you can CD to %TEMP% and %TMP% and then del *.*

asbsamsf, Why would you add a "make directory" command to a cleanup.cmd file?

because RD /s/q command will remove all files and folders including the root folder

  • Author

well i hope it doesnt change the permission settings (access right)...

And deltree does not work :wacko:

Windows shell really su**

Here A VBS script that might work

on error resume next
Set Shell = WScript.CreateObject("WScript.Shell")
WD = Shell.ExpandEnvironmentStrings("%Windir%")
T1 = Shell.ExpandEnvironmentStrings("%tmp%")
T2 = Shell.ExpandEnvironmentStrings("%temp%")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile( T1)
fso.DeleteFile( T2 )
fso.DeleteFile( WD & "\Temp")
'''wasnt sure if you want to remove the files or folder
fso.DeleteFolder( T1)
fso.DeleteFolder( T2 )
fso.DeleteFolder WD & "\Temp")

Edited by gunsmokingman

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.