<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#330000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix"><br>
      <br>
      guy guys<br>
      <br>
      mkdir does what you want<br>
      <br>
      does not issue a warning when the dir already existed, instead
      returns a status that you can ignore:<br>
      <br>
      -->mkdir foo<br>
       ans  =<br>
       <br>
          1.  <br>
       <br>
      -->mkdir foo<br>
       ans  =<br>
       <br>
          2.  <br>
       <br>
      -->mkdir foo<br>
       ans  =<br>
       <br>
          2.  <br>
       <br>
      -->mkdir "this%µ£¨$^? wont work"<br>
       ans  =<br>
       <br>
          0.  <br>
      <br>
      help mkdir<br>
      <br>
      <br>
      <br>
      kind regards<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      On 27/01/2013 09:23, Sylvestre Ledru wrote:<br>
    </div>
    <blockquote cite="mid:5104E410.6030502@scilab-enterprises.com"
      type="cite">
      <pre wrap="">On 27/01/2013 06:05, Samuel Gougeon wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hello Rafael,

Le 27/01/2013 03:51, Rafael Guerra a écrit :
</pre>
        <blockquote type="cite">
          <pre wrap="">../..
In Scilab 5.4 (Windows 7) if one creates a folder with the command:
   status= createdir('D:\OUTPUT');

and the folder already exists, then a warning message will be issued in
Scilab's Console:
   createdir: Warning: Directory 'D:\OUTPUT' already exists.

How can one check in Scilab if a directory already exists?
</pre>
        </blockquote>
        <pre wrap="">with
fileinfo("myDir_or_file_with_path")~= [ ]
</pre>
      </blockquote>
      <pre wrap="">isdir("foo") does the work too.
<a class="moz-txt-link-freetext" href="http://help.scilab.org/isdir">http://help.scilab.org/isdir</a>

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">How to disable the warning message above?
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">

-->createdir("/tmp")
createdir : Attention : Le répertoire '/tmp' existe déjà.
 ans  =

  T

-->warning("off")

-->createdir("/tmp")
 ans  =

  T

<a class="moz-txt-link-freetext" href="http://help.scilab.org/warning">http://help.scilab.org/warning</a>

S

_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>