"icaro" <ic...@icaro.invalid> wrote in message
news:u3o3rh95cfo22noc1...@4ax.com...
> Unfortunately WinSCP can't create nested paths using a single
> command like mkdir /c:/bk/dir1/dir2/dir3 but needs to proceed
> dir by dir (it does not have -p switch to make parent directories).
> This is why I need the weird output.
Thanks for the explanation.
Question : have you thought about a folder possibly (likely?) having
multiple subfolders ? Your current code doesn't account for them...
Also, are you aware that your current code happily returns relative paths
(not starting with a drive letter) ? The end result might not quite be
what you expect from it (the files could be read from / be written to
unexpected places)
> Eventually I found a way to customize a script taken from
> StackOverflow
I hope you also read Herberts reply ? Its a bit compacter, but more
important, it solves the problem of your paths starting with slash before
the drive letter - which, IIRC, makes the returned paths invalid.
Ofcourse, looking at Zaidy036's reply (toward using robocopy) this batch
tinkering could be moot. :-)
Regards,
Rudy Wieser