VBA-Macro to Delete Log Files

Morshed_Dhaka

New Member
Joined
Dec 16, 2016
Messages
42
Hello Everyone,
I am looking for some advanced level help which requires knowledge of Microsoft Excel & Visual Basic (Macro). Here is my problem details:

I have a sharing folder in sharing drive: sharing folder address is G:\User\Log in Dump”. That folder contains so many folder which consisting regular customer log in or log out data and some other details. Those data files created automatically from system, so basically that main folder “Log in Dump” using for system data dump purpose. Each and every day, so many files created into that folder but at the month end, I need to delete all of those manually. So, I am looking for a smart solution by using Microsoft Excel. Here is my proposed solution methodology:

a) I want to create an excel file which will contains 2 macro module.

b) The macro will be simple. There will be a macro which will permanently delete all of the files & folders of that “Log in Dump” folder. Also, as those are customer related data so it has to be ensured that also by using any data recovery software those files can’t be recovered. So, those file will be deleted permanently without any recovery option

c) The macro needs to run automatically. Like, at the end of each month and beginning of each month the macro will run automatically and execute that file & folders delete macro. Also, point to be noted that the PC is admin protected. So, I am not able to use Windows scheduler to run that macro automatically. Looking for other solutions.

I believe that my description of the problem is not too big and easy to understand. If anyone able to help me, I will be really Glad.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,215,381
Messages
6,124,614
Members
449,175
Latest member
Anniewonder

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