title: can't create folder with expect script
body: <p>I have this script </p>
  
  <pre><code>#!/usr/bin/expect
  
  set DATE [exec date +%F]
  spawn sftp user@192.168.0.20
  expect "password:"
  send "password\n"
  expect "sftp&gt;"
  send "cd /getfile/$DATE/ \n"
  expect "sftp&gt;"
  send "lcd /putfile/ \n"
  expect "sftp&gt;"
  send "mkdir $DATE"
  expect "sftp&gt;"
  send "lcd /putfile/$DATE \n"
  expect "sftp&gt;"
  send "mget *.* \n"
  expect "sftp&gt;"
  
  send "quit \n"
  </code></pre>
  
  <p>everything works here, but it does not create the directory. The error is:</p>
  
  <blockquote>
    <p>cant create directory</p>
  </blockquote>
  
  <p>I don't know what I'm doing wrong. Any help would be appreciated.</p>