Topic: Extract Original Filename from Imagevenue filenames
Imagevenue annoyingly corrupts original filenames by appending a random#_ prefix and a suffix beginning with _123 or _122.
You get something in the form: #######_filename_123_###lo_###_###.jpg. The following expression will extract the original name.
%b(s/(.*?)_(.*)_12[23](.*$)/\2/i).%e
If the random # prefix has already been removed, the following will remove just the suffix:
%b(s/(.*)_12[23](.*$)/\1/i).%e
This works even when the filename includes _123 but breaks down if one of the 3 digit random #'s after the _123 is another _123. In that case just run the file again with the second expression.
Examples:
27053_1962_Calendar_12.Janet_Pilgrim_123_1175lo_460_345.jpg => 1962_Calendar_12.Janet_Pilgrim.jpg
0220965_1964-04_123_PMs_Revisited.1956_123_1041lo.jpg => 1964-04_123_PMs_Revisited.1956.jpg
But:
89930_cal._1960_05.Janet_Pilgrim_123_835lo_123_456.jpg => cal._1960_05.Janet_Pilgrim_123_835lo.jpg
Run again with 2nd expression:
cal._1960_05.Janet_Pilgrim_123_835lo.jpg => cal._1960_05.Janet_Pilgrim.jpg
Hope someone else finds this useful!
btw nice program