Synchronizing files to remote directory based on file name

Advertisement

Guest

Synchronizing files to remote directory based on file name

Hello,

I would like WinSCP to go through all the folders beneath the Lot Files directory and copy any file it finds with a name starting with 'tr_'. Can this be done? I tried adding the following -filemask to the below synchronize command but it didn't work: -filemask="tr_*"

synchronize remote "R:\Lot Files\" /productInfo/

Also, is it possible for WinSCP to copy any files it finds beginning with 'tr_' directly into the /productInfo/ folder without creating an subfolders?[/code]

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Synchronizing files to remote directory based on file name

First, do you want to copy them all (unconditionally) or synchronize? If you want to copy unconditionally, use "put" instead of "synchronize".
Then, you need to allow WinSCP to traverse into subdirectories using */ mask.
E.g.
put -filemask="tr_*; */" "R:\Lot Files\" /productInfo/

Also, is it possible for WinSCP to copy any files it finds beginning with 'tr_' directly into the /productInfo/ folder without creating an subfolders?
No.

Reply with quote

Advertisement

You can post new topics in this forum