Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

Re: How to synchronize remote one single file, please help me.

What do you mean by "with a directory"? Do you mean "in a directory"?
This should do (i.e., drop the |*/):
synchronize remote -filemask=A.txt;my_folder/ "C:\" "/"

Or simply:
synchronize remote -filemask=A.txt|*/ "C:\my_folder" "/my_folder"
LeWeir

Re: How to synchronize remote one single file, please help me.

But if the feature is not supported then I will just use put with -neweronly argument as your suggestion, but the stdout still output even WinSCP didnt sync anything is kind of weird :|
Anyway. I love WinSCP already, it's super useful for me rn. :) Starred WinSCP!
LeWeir

Re: How to synchronize remote one single file, please help me.

Thank you so much sir. You're a lifesaver, but I have one more question, I know I can use
synchronize remote -filemask=A.txt;B.txt|*/ "C:\" "/"

to sync A.txt and B.txt files. But how about a file A.txt with a directory called my_folder?

I tried
synchronize remote -filemask=A.txt;my_folder/|*/ "C:\" "/"

and
synchronize remote -filemask=A.txt;my_folder\|*/ "C:\" "/"

but it didn't work. :(
martin

Re: How to synchronize remote one single file, please help me.

Your scripts synchronize all files with given names, anywhere on the C:\ drive.
If you do not want to synchronize subfolders, see:
How do I transfer (or synchronize) directory non-recursively?
The the final script will be like:
synchronize remote -filemask=_qw.txt|*/ -preview "C:\" "/"

The same can also be achieved with put -neweronly:
put -neweronly C:\_qw.txt /
LeWeir

How to synchronize remote one single file, please help me.

How to synchronize remote one single file from local directory C:\ to remote directory /, please help me.

I trial and error hours and still cant make it work, I've tried
option include test.txt
synchronize remote -preview "C:\" "/"

synchronize remote -filemask=_qw.txt -preview "C:\" "/"

but the WinSCP STILL compare all the folders and files in C:\, why...?