I have a "utility" script I run every time I begin to stand up automation on a server. What it does is develops the necessary directories and "stater" batch scripts for the environment.
The "starter" set batch scripts are built based on if a specific Oracle/SQL utility is found. However, when installing the Oracle suite, there are sometimes (2) instances of the same "exe" in (2) different directories. I was hoping to modify my current search pieces of syntax to in a way that would ignore the path if finds if "EPMSYSTEMR1" is in the path, and proceed to the next found occurrence?
Code: Select all
for %%D in (c d e f g h i j k l m n o p q r s t u v w x y z) do if exist %%D: (
for /f "delims=" %%A in ('dir/b/s %%D:\epma-batch-client.bat 2^>nul') do (
SET EPMA_BATCHPATH=%%A
)
)
Thank you!