Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Problem at trying to use mkdir with a path of multiple levels

In general, WinSCP does not support creating multiple levels of directories at once. It may work for some protocols or some servers, depending on implementation details or specific behavior of a specific server. But not in general.
Silvermyst

Problem at trying to use mkdir with a path of multiple levels

I'm using this script to create the directory that it gets as a parameter:
open sftp://%2%:%3%@%4%/ -hostkey="%5%"

mkdir "%1%"

I was working before with FTPS, now it's changed to SFTP. On the previous server the path was, for example, /A/B/C/D, and only /A was previously created, it still created the whole path to the directory. Now, it just lets me create /A/B, but if I try to create /A/B/C or /A/B/C/D, etc, it means that only accepts one folder of depth, and it says "Status code: 2, Message: 528, Server: No such file".

I don't know if it's a problem with the script, WinSCP, SFTP as a protocol or the server itself. What could be happening here?