Excluding Folder's Content

I was just wondering if there is a way to do the following:

Sync:
Foo/bar/

Exclude:
Foo/bar/filname.extenstion

So sync the folder but not whats in the folder.

I’ve tried /bar/ and bar/* but it’s not working. Not sure if it’s possible or if I overlooked something? Thanks!