Help! File extensions
from
WinCustomize Forums
I do believe I'm losing my mind.
Please apply the following code to an object:
'Called when files are dropped onto object
Sub Object_OnDropFiles(files)
strExtension = Right(files,Len(files)-InStrRev(files,"."))
msgbox strExtension
msgbox Len(strExtension)
End Sub
Now, drag and drop an image file onto it.
The first msgbox should show the file extension. The second msgbox should show how many characters are in the extension.
EDIT:
Only one problem: The number of characters is 4 instead of 3.
Please apply the following code to an object:
'Called when files are dropped onto object
Sub Object_OnDropFiles(files)
strExtension = Right(files,Len(files)-InStrRev(files,"."))
msgbox strExtension
msgbox Len(strExtension)
End Sub
Now, drag and drop an image file onto it.
The first msgbox should show the file extension. The second msgbox should show how many characters are in the extension.
EDIT:
Only one problem: The number of characters is 4 instead of 3.
Nevermind. I created a solution.

The only reason I knew it was from the Shortcut Parsing script. Plus I read up in the Windows Script Resource about it. I always find the best search terms are vbscript+FileSystemObject+find file extension