Synchronizing based on a partial filename

Advertisement

AlphaUno
Joined:
Posts:
5
Location:
Nashville, TN

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

Reply with quote

Advertisement

AlphaUno
Joined:
Posts:
5
Location:
Nashville, TN

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?

Reply with quote

martin
Site Admin
martin avatar

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

Reply with quote

Advertisement

You can post new topics in this forum