Amateur photographer, personal use. New to Applescript, spending to much time learning syntax. Need simple Applescript. Select folder, all files with XMP extension, move to new folder in same parent directory named "ParentFolderName sidecar files". Scan all camera raw files with .ARW or .RW2 extension if same file name in folder with jpg or jpeg extension create/move JPEGs to "ParentFolderName jpeg match", scan folder for videos if match with filename jpg or jpeg create/move JPEGs to "ParentFolderName jpeg match", move videos to "ParentFolderName videos).
Example: I have a folder with raw camera files that have matching jpeg files from camera A, Raw files only from camera B, jpeg only files from camera C, videos with matching jpeg file from camera D, and videos only from camera E. If there is a matching pair of raw and jpeg files move the jpeg files to a new folder in same directory with name "ParentFolderName jpeg matches". If videos have matching JPEGs move those images to jpeg matches folder. Move all videos to "ParentFolderName videos" in same directory. Move all XMP files to "ParentFolderName Sidecar Files"
After scrip is run:
In the original folder I should have: Raw files from camera A, Raw files from camera B, JPEGs from camera C.
In the Videos folder I should have: Videos from Camera D and E.
In the JPEG matches folder I should have: any JPEGs that match raw files, any JPEGs that match videos.
In the Sidecar folder All XMP files.