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

Advertisement

Silvermyst
Joined:
Posts:
1
Location:
Bogotá, Colombia

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum