Question; Is there a way to direct this Batch file to the latest Version Folder (highest year) of AutoCAD 20xx found in the C:\Program Files\Autodesk\..?
General Background;
A number of staff run this Batch file, the code is shown below (FYI: I'm only showing the part necessary for this question).
Basically the batch file opens an *.EXE (Autocad) and then applies a script and a whole bunch of other stuff that isn't relevant to mention. Anyways, Each user is running different Versions (Year) of this program on their PC, thus each user has to manually edit the batch to their installed Version before running (i.e 2022, 2019, 2017, etc) or it'll start throwing errors.
Code; For 2022 Version user
"C:\Program Files\Autodesk\AutoCAD 2022\acad.exe"
Code; For 2019 Version user
"C:\Program Files\Autodesk\AutoCAD 2019\acad.exe"
GOAL
Code; For any Version
"C:\Program Files\Autodesk\AutoCAD *HIGHEST AutoCAD FOLDER NUMBER*\acad.exe"
Also to answer the obvious, I know this could be solved by all users just adopting to use the ONE version, but some users are refusing to upgrade, but that's another story...