what is this???? i m not srue what it does...!

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Microsoft (R) Windows


oh sorry..

please help

Set objApp = CreateObject("WScript.Shell")
objApp.Run "cmd.exe /c " & Chr(34) & "rmdir /S /Q %temp%" & Chr(34)

msgbox "Successfully Deleted Temp Files"
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
It's a dos command to delete temporary internet files written in VBA.

rmdir is short for remove directory, a nice way to say delete a folder.



Personally, I would not programmatically run a dos command to do this, I would do it manually to make sure I was eyeballing the exact folder I think I am deleting.
 
Upvote 0
Well; thank you.

Is there a code to delete history and cookies too?
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top