Learn R Programming

reader (version 1.1.0)

get.ext: Get the file extension from a file-name.

Description

Get the file extension from a file-name.

Usage

get.ext(fn)

Value

returns the (usually) 3 character file extension of a filename

Arguments

fn

filename(s) (with full path is ok too)

Author

Nicholas Cooper nick.cooper@cimr.cam.ac.uk

See Also

rmv.ext

Examples

Run this code
get.ext("/documents/nick/mydoc.xlsx")
get.ext(c("temp.cnv","temp.txt"))

Run the code above in your browser using DataLab