VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Hi ****

    please I'm a cat that need a help

    suppose I have 2 directory:

    in DIR1 there are present:

    Code:
    C0001.MXF
    C0002.MXF
    C0003.MXF
    C0004.MXF
    C0005.MXF

    and in DIR2 there are present:
    Code:
    C0001.AVS
    C0002.AVS
    C0003.AVS
    C0004.AVS

    and not C0005.AVS


    I would like do a batch that find if for each filename contained in DIR1, does exist the correspondand .avs in DIR2 and only if all the files are correspondand --> set a variable TRIGGER from 0 to 1.

    In my case does not exist C0005.AVS so there is not correspondace (variable TRIGGER remains to 0)

    How can I do?

    thanks
    Last edited by marcorocchini; 2nd Oct 2017 at 16:41.
    Quote Quote  
  2. windows batch has a specific command to find out if file exists or if it does not exist
    if exist "%file%" do .....
    if not exist "%file%" do ....

    Code:
    for %%a in ("*.MXF") do if not exist "%DIR2%\%%~na.avs" set "TRIGGER=1"&goto :out
    :out
    Quote Quote  
  3. it works
    Image Attached Images  
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!