Extracting file name from full name



Hello

I have a string that contains a full path and file name. What is the easiest way to extract the file name? For example the path is /dir1/dir2/dir3/file.txt.

Andrew
.