Ignore files during automatic transfer

How to ignore certain files when transferring. For example, if there are 2 files in the folder, 1.txt and 2.txt, but I want to transfer only the 1.txt?

Can you explain it? What is “transfer”? Sync to a Nextcloud client? You can sync single files or folders. Maybe you can change your directory structure. Post an example.