(Apologies if this is against etiquette, but this is a repost of a simple question that I feared wouldn't be seen, as it is buried at the end of a long post: http://www.excelforum.com/showthread.php?t=587929 )
I have a macro that goes through a bunch of dbf files and deletes certain among them, according to a certain criterion (which happens to be E2 = 0, though that's irrelevant here). Let's say, of files a_1.dbf thru a_100.dbf, the macro deletes a_7.dbf and a_22.dbf. My question is this: I would also like the macro to delete a few other random files called a_7.prj, a_7.shp, a_22.prj, and a_22.shp. I think this is a simple matter of removing the .dbf extension and concatenating the .prj and .shp extensions to the result, and then killing those files, but I don't know how to remove (de-concatenate?) parts of filenames. Can anyone tell me if there is there a simple way to do this?
Many thanks.
Bookmarks