-2

I execuet the below batch to get my script "mvn.bat" to execute on all the folders under a directory. As you see the for loop considers "*" as input and this all folders are considered for execution.

FOR /D %%G in ("*") DO (
    D:\maven\bin\mvn.bat jcli:deploy -Dlist.dir="./%%G" -Denv.name=Server1 -Dint.service=Server service
)

I now wanted the script to ignore folders that ends with Shared (condition "*Shared"), i tried several ways putting if loop to filter and etc,, but nothing worked out, any sugeestion or solution will be helpful..

0

1 Answer 1

0

Its hard to tell what you are really asking but I think you cannot do that in a DOS batch script but you can do that in C# or Powershell possibly. Your clue can be found here ?

Sign up to request clarification or add additional context in comments.

1 Comment

I think i miscommunicated, I wanted the loop to exclue folders with the name '*shared' and they are not really a shared folders

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.