Jump to content

Recommended Posts

Posted

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

Posted (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

IceMan

I 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 by Paulie

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...