Here is a Bridge script that should sort the documents.
It will create Landscape, Portrait and Square folders off the selected folder.
To use: select the documents, Tools - "Sort Landscape - Portrait - Square Pics"
The script must be a plain text document with a .jsx extension.
Place the script in the correct folder, this can be found by going to the preferences - Startup Scripts - then click the button "Reveal My Startup Scripts" this will open the folder where the script is to reside.
Once placed restart Bridge and accept the new script.
#target bridge
if( BridgeTalk.appName == "bridge" ) {
sortPics = new MenuElement("command", "Sort Landscape - Portrait - Square Pics", "at the end of Tools");
}
sortPics.onSelect = function () {
var sels = app.document.selections;
if(sels.length < 1) return;
var origFolder = decodeURI(app.document.thumbnail.spec);
var portFolder = Folder(origFolder + "/Portrait");
var landFolder = Folder(origFolder + "/Landscape");
var sqrFolder = Folder(origFolder + "/Square");
if(!portFolder.exists) portFolder.create();
if(!landFolder.exists) landFolder.create();
if(!sqrFolder.exists) sqrFolder.create();
app.synchronousMode = true;
for (var s =0;s< sels.length;s++){
var Thumb = new Thumbnail(sels[s]);
var Rotation = Thumb.rotation;
var Width = Thumb.core.quickMetadata.width * 1;
var Height = Thumb.core.quickMetadata.height *1;
if(Width ==0 || Height == 0) continue;
if(Width > Height && Rotation == 0) Thumb.moveTo(landFolder);
if(Width < Height && Rotation == 0) Thumb.moveTo(portFolder);
if(Width > Height && Rotation != 0) Thumb.moveTo(portFolder);
if(Width < Height && Rotation != 0) Thumb.moveTo(landFolder);
if(Width == Height) Thumb.moveTo(sqrFolder);
}
app.synchronousMode = false;
};