Sync only specific files from a remote directory

Advertisement

Haho76
Joined:
Posts:
2
Location:
Wien

Sync only specific files from a remote directory

Hi,

I would like to write a script so that from a remote directory new files are synced to a local directory, BUT only specific files that are on local directory, while those are on remote ofc, but remote also has quite some other files.

Is there any way to do that with the synchronise function?

Unfortunatly there´s no common thing along these files - so a fiter mask would not work. All files are txt files with different names, but there are other txt-files on remote directory I do not want.

The goal is to donwload the files I want one time manual to local directory and then run the script (VB.net) to sync them (get latest versions) - without downloading other files on remote directory

Reply with quote

Advertisement

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

Re: Sync only specific files from a remote directory

There are many ways. For example, just list all local files, grab their names and put them to a generated file mask.

Reply with quote

Haho76
Joined:
Posts:
2
Location:
Wien

ok, well that means get all local filenames into a list/array and then do a loop with GetFiles method calls? Also handle each transferresult separatly then?

As I can´t see a way using a mask for multiple files if they do not have a common thing.

I thought there might be an easier way with SynchronizeDirectories method, a parameter I do not know or anything that synchs only the already existing files in target directory

Reply with quote

Advertisement

You can post new topics in this forum