get_filename#
- get_filename(file_path: str | CloudPath | Path, other_exts: list | str | None = None) str [source]#
Deprecated since version 1.30.0: Import it from
sertit.path
instead ofsertit.files
Get file name (without extension) from file path, i.e.:
- Parameters:
- Returns:
File name (without extension)
- Return type:
Example
>>> file_path = 'D:/path/to/filename.zip' >>> get_file_name(file_path) 'filename'