You are browsing the archive for extension.

by chip

theExtension

April 23, 2008 in Linux, Mac OS X, Vista, Windows XP by chip

FUNCTION theExtension tPathAndFile
    IF tPathAndFile contains "." THEN
        set the itemdel to "."
        put item -1 of tPathAndFile into tExtension
        return tExtension
    ELSE
        return empty
    END IF
END theExtension

by chip

stripExtension

April 23, 2008 in Linux, Mac OS X, Vista, Windows XP by chip

FUNCTION stripExtension p
    IF p contains "." THEN
        set the itemdel to "."
        delete item -1 of p
    END IF
    return p
END stripExtension