How-to articles, tricks, and solutions about FILENAMES

Extracting extension from filename in Python

You can extract the file extension from a file name in Python by using the os.path module.

Getting the filenames of all files in a folder

To get the filenames of all files in a folder in Java, you can use the File class and its list method.

Getting the names of all files in a directory with PHP

In PHP, you can use the scandir() function to get the names of all files in a directory.

How do I get the file name from a String containing the Absolute file path?

To get the file name from a String containing the absolute file path in Java, you can use the following methods: