cmd:dirname 

Usage 

$ dirname /some/path/location/file1.ext
/some/path/location