Back up files but not subdirectories

I would like to back up all files in a directory, but not subdirectories.

I tried specifying --exclude-file=excludes and in the file I have:

/mydir/**
!/mydir/*

but that doesn’t work.

Is there a way to do this?

Why not use:

/mydir/*/*

The exclude patterns do not offer the possibility to differentiate between files and directories. Thus the only options is to also include all directories, but exclude their contents.