<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>dirname</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="dirname"> get directory from filenames</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>dirs= dirname(files[,flag [,flagexpand]])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>files</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: a string matrix giving a set of file names.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>flag,flagexpand</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: boolean optional parameters. (default value <VERB>%t</VERB>).</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>files,dir</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string matrices.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>dirname</VERB> return the dirname of the file entries given in files.</P>
    <P>
    If <VERB>flag</VERB> is true the files are first converted to the target 
    type given by the <VERB>MSDOS</VERB> variable. 
    Moreover, if <VERB>flagexpand</VERB> is true leading strings like
    <VERB>HOME</VERB>, <VERB>SCI</VERB> or <VERB>~</VERB> are expanded using environment
    variables.</P>
    <P>
    Note that <VERB>dirname(files,%f)</VERB> can give erroneous results if 
    pathnames given in files do not follow the convention 
    given by the <VERB>MSDOS</VERB> variable.</P>
  </DESCRIPTION>
  <EXAMPLE>
<![CDATA[
files=dirname('SCI/macros/util/poo.sci')
files=dirname('SCI/macros\util/poo.sci')
files=dirname('SCI/macros\util/poo.sci.k')
 ]]>
  </EXAMPLE>
  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>basename</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>listfiles</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>pathconvert</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
</MAN>
