icemanV Posted April 18, 2007 Posted April 18, 2007 Hi Anyone have any idea how to check whether the filename extension is .lnk or .exe or .bat etc. I was looking through the functions and marcos but failed to find a suitable functions or marcos thanks IceMan
Paulie Posted April 18, 2007 Posted April 18, 2007 (edited) Hi Anyone have any idea how to check whether the filename extension is .lnk or .exe or .bat etc. I was looking through the functions and marcos but failed to find a suitable functions or marcos thanks IceManI made a UDF for you: MsgBox(0,"Test.txt", _GetExt("Test.txt")) Func _GetExt($Filename) $Int = StringSplit($Filename, ".") If IsArray($Int) Then Return "."&$Int[UBound($Int)-1] Else Return 0 EndIf EndFunc Edited April 18, 2007 by Paulie
icemanV Posted April 18, 2007 Author Posted April 18, 2007 Hi Paulie Thanks... your function is perfect!!! IcemanV
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now