Re: move remote files with different extension to a folder and create it if not exist.
I've understand theoption batch continue
if the directory already exist, and the mkdir, but I don't understand the last two commandsoption batch abort
andstat foldername
.
With
option batch continue
the mkdir
would succeed, even if it failed to create a (non-existent) directory. stat foldername
(in abort
mode) fails, if the folder/file does not exist. So it's a way to abort the script, if it failed to create the folder.
See also https://winscp.net/eng/docs/script_checking_file_existence#scripting