Cookies Nos
Cookies Nos

Reputation: 1

Is possible to have for with two paths

With this code:

Rem If "%~1"=="" Exit/B

For %%A In ("%LocalAppData%\Microsoft\Outlook\*.ost"a) Do (

    Rem "%~1" "%~f0" :: "%%~fA"


    If %%~zA Lss %maxbytesize% (

    ) Else If "%email%"=="0" (

        msg * algo

    )
)

Is possible to make the for search two different path, like:

For %%A In ("%LocalAppData%\Microsoft\Outlook\*.ost" and C:\Users\%username%\Documents\Outlook Files\) Do (

Upvotes: 0

Views: 65

Answers (1)

Compo
Compo

Reputation: 38632

Almost how you've done it!

For %%A In ("%LocalAppData%\Microsoft\Outlook\*.ost" "%UserProfile%\Documents\Outlook Files\*.pst") Do (

You can split them onto separate lines to make it easier to read too:

For %%A In (
    "%LocalAppData%\Microsoft\Outlook\*.ost"
    "%UserProfile%\Documents\Outlook Files\*.pst"
    "%AppData%\Local\Microsoft\Outlook\*.pst"
) Do (

Upvotes: 1

Related Questions