Does this help?
#target photoshop
var theFolder = Folder.selectDialog ("select folder");
if (theFolder) {
var theFiles = theFolder.getFiles(/\.(jpg|tif|eps|psd)$/i);
for (var m = 0; m < theFiles.length; m++) {
var thisFile = app.open(File(theFiles[m]));
if (thisFile.name.indexOf("10") != -1) {app.doAction(/*insert name of action*/, /*insert name of action set*/)}
}
};