How to pass commands to ADB shell?
The adb interactive shell only starts if you simply run adb shell. If you add a command at the end it will be executed on the device shell and then adb returns (non-interactive mode):

adb shell ls /Path/To/Folder/*.abc


Of course in the end you can send the output to a filellist.txt on your computer:

adb shell ls /Path/To/Folder/*.abc &gt; filelist.txt