After much trial and error I've managed to solve this one I think. You can do it either with files in a folder (answer 01 below) or with loaded files in the QGIS TOC (answer 02 below). I suspect these aren't that elegant but they do seem to work; any suggestions on improvements are welcome.
Answer 01 - this takes an input folder and iterates over the rasters in it.
##Lisflood - Calculate Velocity Vectors=name
##inputfolder=folder
##outputfolder=folder
#import the os and processing modules
import os
import processing
#iterate through all the files in the input folder
for filename in os.listdir(inputfolder):
#Compare the file extensions - this is what we're using the select the files
if filename.endswith(".Vx"):
#Set the inputvx and inputvy parameters - you need to specify the full filepath
inputvx = inputfolder + "/" + filename
inputvy = inputfolder + "/" + filename [:-3] + ".Vy"
#Specify an output name - this goes into the final processing tool
OutputName = outputfolder + '/' + filename [:-3] + '_VelocityVectors.shp'
#Run whatever tools you want - in this case I'm calculating directional vectors from Vx and Vy velocity grids. outputs_SAGARASTERCALCULATOR_1=processing.runalg('saga:rastercalculator', inputvx,[inputvy],'sqrt(a^2 + b^2)',True,7,None)
outputs_SAGARASTERCALCULATOR_3=processing.runalg('saga:rastercalculator', inputvx,[inputvy],'(atan2(a,b)) * (180/pi())',True,7,None)
outputs_SAGAGRIDVALUESTOPOINTS_1=processing.runalg('saga:gridvaluestopoints', [outputs_SAGARASTERCALCULATOR_3['RESULT']],None,True,0,None)
outputs_SAGAADDGRIDVALUESTOPOINTS_1=processing.runalg('saga:addgridvaluestopoints', outputs_SAGAGRIDVALUESTOPOINTS_1['SHAPES'],[outputs_SAGARASTERCALCULATOR_1['RESULT']],1,OutputName)
Answer 02 - this one is the same but this one uses layers loaded into the QGIS TOC instead of an input folder so you don't need :
##outputfolder=folder
for layer in QgsMapLayerRegistry.instance().mapLayers().values():
layerfilepath = layer.dataProvider().dataSourceUri()
NameStub = layer.name()
if layerfilepath [-3:] == '.Vy':
layer.setLayerName(NameStub + '.Vy')
elif layerfilepath [-3:] == '.Vx':
layer.setLayerName(NameStub + '.Vx')
layerfilepath = layer.dataProvider().dataSourceUri()
NameStub = layer.name()
if NameStub [-3:] == '.Vy':
inputvy = layerfilepath
print inputvy
inputvx = layerfilepath [:-3] + '.Vx'
print inputvx
OutputName = outputfolder + '/' + layerfilepath [:-3] + '_VelocityVectors'