Unix sftp - mput command - transfer all files with a specific prefix
If your files all in current directory:
sftp user@server << EOFcd /destination$(for i in ABC* XYZ*; do echo "put $i"; done)EOF
Output (example):
Connected to server.sftp> cd /destinationsftp> put ABCfoo.txtUploading ABCfoo.txt to /destination/ABCfoo.txtABCfoo.txt 100% 0 0.0KB/s 00:00 sftp> put XYZfoo.txtUploading XYZfoo.txt to /destination/XYZfoo.txtXYZfoo.txt 100% 0 0.0KB/s 00:00