Go to: Synopsis. Return value. MEL examples.

Synopsis

string fileExtension(string $file)

Return the file extension.

Return value

None

Arguments

Variable Name Variable Type Description
$filestringA file that may contain a file extension.

MEL examples

	fileExtension("file.txt");
	// Result: txt //


	fileExtension("c:/Images/image.bmp");
	// Result: bmp //


	fileExtension("/usr/images/picture.jpg");
	// Result: jpg //


	fileExtension("c:\Documents\Pictures\me.jpg");
	// Result: jpg //


	fileExtension("frame.012.tif");
	// Result: tif //