I found part of this question in 2 other posted questions, but I cant seem to get the last step working which is just "opening" the file:
How do I get files found by command-line 'find' ordered by modification date in OS X?
macOS Terminal find most recent file in directory
The end goal is to find the most recent file open by a specific application (in this case, a ".vesp64" file) and then open it automatically on restart.
I figure the "automatically on restart" thing can be sorted as making the script a login item unless there is a better way to do it.
I've tried running this
find . -type f -name "*.vesp64" -print0 | xargs -0 ls -tl dir | head -n 1
which seems to work to find the file I need, but then how do I open the file it found?
edit : there is no way to recall the last state it was in automatically like other apps, so I need to find a way to do it in terminal. this is the program https://www.vsl.co.at/en/Vienna_Software_Package/Vienna_Ensemble_Pro