Re: mkdir error if already exists
It worked for me.
Really good solution!!!
Really good solution!!!
option batch continue
before mkdir
to ignore any errors and restore the option batch abort
after.
#--> 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 <--#
<?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>