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"
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,224
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.
 

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Well; thank you.

Is there a code to delete history and cookies too?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,709
Messages
5,597,693
Members
414,164
Latest member
ARTW

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
Top