Hi all. After some excellent advice from shg, I've figured out that a user defined data type is exactly what I need to make my file cataloging project move forward. Now, I have a simpler question. How do I get the extension of a given file? I know that I can do a long, drawn out process of searching each file's name for the "." character, verifying that it's near the end of the string, counting its position, and clipping the characters before it. But, I assume there's some much simpler way to do it. Here's my code:
As you can see, I tried the GetExtensionName method, but it just didn't work. I get runtime error 438, "Object does not support this property or method." According to Help, I need a FileSystemObject before the method, and I need to have a path as the argument. I believe I've done both those things, but it appears I have not. Any suggestions?Please Login or Register to view this content.
Bookmarks