How to remove specific custom properties

I am trying to remove several custom properties from a number of files with in a folder. I do not want all the custom props removed only specific ones so the macro would have to be edited by me to fill in the blanks. Could any help me out with this?

The " swCustPropMgr.Delete "Finish" " section is the bit where the custom property is removed, so change "Finish" for whatever custom property you have. Copy and paste below for as many properties you want to change. You could then run this through task scheduler to run over a bunch of files located in a folder rather than individually doing it.

The " swCustPropMgr.Delete "Finish" " section is the bit where the custom property is removed, so change "Finish" for whatever custom property you have. Copy and paste below for as many properties you want to change. You could then run this through task scheduler to run over a bunch of files located in a folder rather than individually doing it.

The Task Scheduler is not as easy as I thought. I figured I'd set the program (SW), choose the macro, and then choose the folder location that contains all the files that need updating. The Scheduler doesn't seem to provide for a folder location. That being the case, how does the macro know what files to update? Obviously I'm missing something, can you please point out what it is that I'm missing?

Would you mind using your code injunction with the code that you would have to write to open all files in a given folder to be used in Task Scheduler? I have been trying since early this morning to make this work and it's become clear to me that I'm just wasting my time. I read the tutorial but I need more tutoring. So what I'm asking is can you provide the exact code you would use to do this task in TS, and I'll manipulate the parameters to suite my machine?

That worked Steven! Thank you for all your help, and Deepak is always a great resource for me. I wish I had a fraction of the API knowledge as he does.

Because this is such a powerful tool (the gears are turning) I have to ask one more question. Can you add properties the same way? And if you can, can they be added in such a way that they wouldn't override an existing property. In other words, if I have a 1000 files and 300 of those have the property I want to add already present, would it override its value?

This adds a custom property called "ProjectName" if it doesn't already exist.

Change "ProjectName" to the custom property you want and "TESTING" to the value you want wrote to the custom property. I've tested it on 3 files, the first of which had "TEST" rather than "TESTING" for a value and it never over wrote it.

Steven, that was great! I didn't even think of adding and deleting in the same macro. This little macro is a game changer for some of the tasks I'm up against. I did notice one thing that I didn't catch the first time and that is it didn't update assembly files only part files. Does the strFileName control this?