I am writing a batch script to install programs silently, the problem I have is that each exe file to install the program has a version number after the name of the file, so (7zip v9.20.exe).
I need to write a batch script that will search a folder for the file regardless of the version number, so only matching 7zip in the file and then executing that file to run the silent installation.
I have the part with the silent installation down it is just that I need a way to search a folder for 7zip, without the version number, and run that exe.
If the “7zip *.exe” file is located in anyone of %PATH% folders:
If the “7zip *.exe” file is not located in %PATH%: