Excel VBA File Management

camle

Board Regular
Joined
Jan 10, 2013
Messages
216
I been looking for a way to do File Managing VBA and been unsuccessful.

I would like it to do the following:

1. Read a folder including subfolders on a network drive
2. Compare those filename to a database in excel

filename format = Name ####-##-## Name.ts or Name ####-##-##_# Name.ts

3.if there is a match, delete the file from the folder

I would Appreciate the help,

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
OK finally able to get this file naming to take out the spaces.

So the latest file recorded is "Property Brothers-2014-06-21-Samira & Shawn.ts"

If "Samira & Shawn" is in the database then delete
"Property Brothers-2014-06-21-Samira & Shawn.ts"
In the database it is renamed to "Property Brothers 3x06 Samira & Shawn" so that it matched the TVDB website.

The "####-##-##" as stated before is the data that it was recorded.

Confusing?
 
Upvote 0
Ok, Mr. Rothstein, Sorry that I lost you. I didn't mean any harm, I do thank you for your help.

I guess we can consider this tread closed

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,750
Messages
6,132,506
Members
449,730
Latest member
SeanHT

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