Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Andres Tello

It works

Thanks for share
martin

There's no -filemask switch in 4.3.7.
You get "Unknown switch 'filemask'." error.
You should see that in the console or log.
AlphaUno

Thanks prikryl for the response!

I have tried that and to be safe just tried it again. I also want to point out that If I run this with winscp synchronization (not via scripting) and I set a file mask it does work correctly. Wish there was a way to convert a successfully operation to script :?

As you may have guessed most of the directories are virtualized and because of this some of the software tends to get out of date. I did notice the current version I have is 4.3.7 Build 1679. I'm wondering if there was a problem to the file masking ability that has been corrected since this version?
martin

Re: Synchronizing based on a partial filename

1) There's no pause command in WinSCP
2) More appropriate mask may be "cl*".
AlphaUno

Synchronizing based on a partial filename

Hi I am wanting to create some script that will move all the files from an one of my servers to another. This is going to be used for backup purposes and run often.

I see the synchronization is the way to go and I have easily created some batch files that will do this with winscp. :D

However my problem lies in that I don't want all files from that folder moved only ones with the a file name that begins with "cl" but the rest of the file name is different and may have a completely different file extension.


Here is my code as I think it should work :!:...taking off the filemask and it works great moving over all of my files but that's only half of my objective as I only want the ones with cl.
open asp1_checks


pause


synchronize -filemask="cl.*" local "Y:\checks\" "/asp1/luminx/naa/live/jacob/checks/"

exit