consolidate or discard folders

Advertisement

Kurbycar32
Guest

consolidate or discard folders

I am synchronizing from a server using a txt script. The server contains many directories, and I do not need the folders, just the files inside. Is there a way to download only the contents of those folders without recreating the directory structure? I realize that a sync probably wont do the job anymore and I am open to change. Maybe I can use a search that includes subfolders and then download those results, but I was unable to determine the syntax from the page I found on that subject: https://winscp.net/eng/docs/custom_commands#search. I also searched the forum before posting

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,671
Location:
Prague, Czechia

Re: consolidate or discard folders

You cannot do this using simple scripting.
But this could be easy using WinSCP .NET assembly.

This example shows how to recurse:
https://winscp.net/eng/docs/library_example_recursive_search_text

It actually even downloads all the files the one folder (temp folder in this case). So it just needs few tweeks to do what you need.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum