Home / Lua Scripts Libraries API Manual / dtutils.file / chop_filetype
< check_if_file_exists
create_unique_filename >

# chop_filetype

## 🔗NAME

chop_filetype

## 🔗SYNOPSIS

remove a filetype from a filename

## 🔗USAGE

    local df = require "lib/dtutils.file"
    local result = df.chop_filetype(path)

path - string - a filename with or without a path

## 🔗DESCRIPTION

chop_filetype removes the filetype from the filename.

## 🔗RETURN VALUE

result - string - the path and filename without the filetype

< check_if_file_exists
create_unique_filename >