You are 1 of 21 Active ASP Visitors
 
 
  ASP Home  |  Resources  |  Write a Review  |  My Favor-Its  |  Login
Share on Facebook Tweet this! Share on Google+ Share on LinkedIn Add to Del.icio.us   Add to StumbleUpon eee
 


 
Resource Menu
3
Reviews
0
Favor-It
This is a simple bit of code that can be used to extract the 3 character extension of a file, filename or document and display a different message or perform a differnt function for each. Very useful when used with a file upload. Code: ASP 3.0 & VBScript

Sponsor



User Reviews   
   Authentic (1)  Anonymous (2) 




      
Overall Rating:
Codango PHP, ASP .NET, JSP Scripts, Resources, Reviews
Click to Read Reviews
User
Rated
    
poor/buggy code    
Written by Anonymous User (#1398-68) from Md, USA   (Tuesday, May 15, 2007)
Strengths:   no comment  
Weaknesses:   it's wrong  
Details:   This code snippet is poor, and has a bug, making most of it useless/unnecessary. str3 = intHowLong - intHowLong + 3 is subtracting intHowLong from itself. All this does is say : str3 = 3 It will *always* = 3. Then it uses that value in here. strExt = Right(strFilename, str3) You'd might as well just summarize all this down to the one line below. strExt = Right(strFilename, 3) The bug basically means that even checking the total length was a waste of code & time. Better would be to look for the '.' and get the length one one side of it. Remember that not all file extensions are 3 chars long.
Review Based On:   using demo only  

Works like a charm!    
Written by Anonymous User (#1444-127) from Nebraska   (Friday, February 06, 2004)
Strengths:   Small, fast code and it works!  
Weaknesses:   no comment  
Details:   This bit of code worked perfectly for me. I actually modified it a little bit to append an extension onto the filename. It worked the first time I ran the code. Thanks!
Review Based On:   1 Day(s) of usage  

right code at the right time    
Written by Lil Peck from Kansas   (Saturday, July 26, 2003)
Writer is with: http://www.nsba.com/net
Strengths:   does exactly what it is supposed to do  
Weaknesses:   na  
Details:   I have a script that displays a list of files. I needed to make the image files display with code different from the Flash files. This little script makes that easy.
Review Based On:   1 Hour(s) of usage  

 
Shopping Cart

 

 

 

 
   
  Link to Us  |  About Us   Advertise  |  Contact Us  |  Website Help  
Write a User Review Today!
Its Fun, Fast, and Easy!
Web site monitoring by Web Site Monitor - for Android

2014 InfoVertica, LLC, All Rights Reserved *