Topic "Synchronizing files to remote directory based on file name"

Author Message
Guest




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]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
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/

Quote:
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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License