dirname
dirname — returns the directory path of a file.
dirname (filename)
filenameA file name as a string, including its directory path, as defined by the operating system.
The directory path of the filename, or if no path
is entered, the filename.
This function reads the filename and directory path
as a string, returning the directory path as a string.
Gamma>x = dirname("/usr/george/lib/misc/myfile.dat");"/usr/george/lib/misc"Gamma>y = dirname("misc/myfile.dat");"misc"Gamma>z = dirname("myfile.dat");"myfile.dat"Gamma>