mkdir error if already exists

Advertisement

JohnZT
Guest

mkdir error if already exists

Hi prikryl,

I am using winSCP version (5.5.6) in scripting form.
Here is my script:
#--> This script was created by SQL <--#
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect
open ftp://blablabla/ 
# Command Line
cd /xxx/extract/
mkdir 201508
cd 201508
rm "XXX_201508*.zip"
put "\\blabla\201508\XXX_201508*.zip"
# Disconnect
close
# Exit WinSCP
exit
#--> EOF This script was created by SQL <--#

And this is my xmllog:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="blabla" start="2015-09-08T13:20:24.578Z">
  <failure>
    <message>Error creating folder '201508'.</message>
    <message>201508: File exists.</message>
  </failure>
  <mkdir>
    <filename value="/xxx/extract//201508" />
    <result success="false">
      <message>201508: File exists.</message>
    </result>
  </mkdir>
</session>

Is there any way I confirm if the folder already exists and bypass mkdir step?

Best regards,

João Silva

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum