Get the filename from a path.
basename relative/path/file.txt # file.txt
To get only the path check dirname.
TIP
If using fish, you may also use path basename.
fish
path basename