Looks like your Black borders have been trimmed to your images white frame. The image does not have white borders.
The reason Trim is not working for you is that it is designed to produce a rectangle, not to erase an area. With a scalloped edge you cannot eliminate all the black with Trim.
To me it looks like trim work fine. Trimmed all black borders to the bounds of the white frame. I see a rectangle.
JJ I am referring to removing the black "valley" between the white crests. Trim is not the tool for that. To remove the white border entirely requires a crop. (To compound the problem, some of the image area is the same tone as the border.)
I know that. The Op most likely wants to remove the white frame an the black borders. That is not something that can be done with trim.
They may be to record and action to do what they want to do.
Mar, I have a suggestion for an Action that may work for you if all the images are positioned similarly.
Open a file
Edit > Canvas size. Relative. Enter a minus figure in both height and width, about the size of the image border. You will be told that you will clipping area. Click: Proceed
It will trim to a borderless image which can be Saved
Note that even though you may have different sized images, since the adjustment in canvas size is relative, it will trim the images to their individual size.
One more thing: A longer Action could then increase the canvas size to provide a white margin, if desired.
I didnt think of your suggestion but that would probably work. The images have a sloppy border and the black area that is shown is from the bulk scanner where the print was uneven. I thank you for your suggestion and will use this in the future.