VBA to search out and delete .tmp files

tcfreer

Board Regular
Joined
Jan 24, 2017
Messages
72
Hi all

I've been googling for 2 days on this and still have nothing.

I'm looking for some VBA code to seek out and remove all / any .TMP files that are created, across a whole server.

I'm looking cause we have a issue with in my business of files creating lots of .tmp files

If anyone has any different soloutions I am all ears

Its currently sapping me of about 10-12GB of storage a week currently :(

Cheers
TC
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Thanks MrKowz

I was abit hesitant about using Powershell, I'll give it a go though

Would going through a Terminal Server be of a issue do you think?
 
Upvote 0
That shouldn't be an issue, as long as you're on a domain administrator profile, I believe. If you are a server admin, I would highly recommend learning PowerShell. I was an incident manager for an IT company for a few years, and PowerShell scripting was a godsend once we got someone who was capable of it. It allows you to not only take care of huge manual tasks such as what you're looking to accomplish.... but you can use it much like any other scripting language to develop repeatable, scalable, processes.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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