Help! File extensions
Friday, June 22, 2007 by sViz | Discussion: DesktopX
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.
Reply #5 Saturday, June 23, 2007 2:21 PM
Reply #6 Sunday, June 24, 2007 1:04 AM

Now, is there a GetMyHairBack Method or am I stuck sporting the Britney look?
Reply #7 Sunday, June 24, 2007 1:57 AM
Reply #8 Sunday, June 24, 2007 4:17 PM
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 extensionPlease login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Friday, June 22, 2007 8:13 PM