Home / Lua Scripts Libraries API Manual / dtutils.file / get_filename
< get_executable_path_preference
get_filetype >

# get_filename

## 🔗NAME

get_filename

## 🔗SYNOPSIS

get the filename and extension from a file path

## 🔗USAGE

    local df = require "lib/dtutils.file"
    local result = df.get_filename(filepath)

filepath - string - path and filename

## 🔗DESCRIPTION

get_filename strips the path from a filepath and returns the filename

## 🔗RETURN VALUE

result - string - the file name and type

< get_executable_path_preference
get_filetype >