Okay i have figured it out ! but when It copys the files it also copies the folders along with the files. Is there anyway I could just get the files, instead of the files in subfolders?
-filemask=AAA.txt*|*/
See https://winscp.net/eng/docs/faq_script_non_recursive