Directories also moving

Hi below is my request to rclone.

{
    "srcFs": "demo:/data/CHBULKUPLOAD/LOCALTESTING/Src1/",
    "srcRemote": "/data/CHBULKUPLOAD/LOCALTESTING/Src1/",
    "dstFs": "demo:/data/CHBULKUPLOAD/LOCALTESTING/Dst1/",
    "dstRemote": "/data/CHBULKUPLOAD/LOCALTESTING/Dst1/",
    "_async": false,
    "_filter": {
        "IncludeRule": [
            "*.txt"
        ]
    }
}

now my folder structure:
inside my Src1 i created two sub directories naming dir1 and dir2.

inside dir1 i put 1 text file and 1 json file.
inside dir2 i put html file.

now whats happening is rclone is moving the directory also from
the source to destination.

in my scenario it moved the dir1 along with its txt file.

but i have clearly defined a pattern as *.txt
first thing is : why it also checked the subdirectories and moved them?
second thing : is there any way i can ask rclone to not include the subdirectory from the source path?

might try --max-depth=1

Because rclone logic is to act on objects. In your case you have three objects:

Src1/dir1/file.txt
Src1/dir1/file.json
Src1/dir2/file.html

When you move/copy/sync Src1 filter narrows it down to:

dir1/file.txt

and this is what will be created at the destination.

If you only want to act on specific file use copyfile. It works similar like copyto.

Hi,
i tried this but this didn't work.
thanks for the response