Put -delete blows away directory structure

Advertisement

Eagletech
Guest

Put -delete blows away directory structure

How can I keep my local directory structure after issuing a put -delete command to move all files, to a server with same directory structure?

Here's the scenario
Local directory is a windows share with a directory structure I want to keep
Remote directory is an SFTP server with same directory structure I need to present to clients
I use winscp to transfer files only but I need to remove files from local directory after transfer so after clients delete them they don't return.

example non-working script line "put -delete -filemask=|To_Company\ *.*>0K"
If I remove ">0K" then it deletes all directory structure except for the "To_Company" directories, I need to keep the structure and just delete the files.

Reply with quote

Advertisement

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

Re: Put -delete blows away directory structure

WinSCP cannot do this.

You would have to code it, for example using WinSCP .NET assembly.

Reply with quote

Advertisement

You can post new topics in this forum