I have a bat file
My goal is to get the running time of a file as a var so that I can compare it
but I am not getting the var populated
I can pump the output into a txt file
"%mi_exe%" --Inform=General;%%Duration/String1%% "%%a">"C:\03_t\trt1.txt"
but I do not successfuly get it OUT of the txt file C:\03_t\trt1.txt and into the var trt01
set /p trt01=<C:\03_t\trt1.txt
a echo trt of cap is %trt01%
only shows: trt of cap is
like %trt01% never "holds" the value from the txt file
any assistance is appreciated.
thanks much
/// my bat
@echo off
SetLocal EnableDelayedExpansion
REM 5.25.2016 js ::: V3
REM check trt of captured uncmov compare to trt of dv50mov & j2k.mxf
REM sanity_check_sz.bat
REM expected is C:\03_t ** here will stack 3 txt files
REM trt1.txt cap Uncmov trt
REM trt2.txt product Dv50mov trt
REM trt3.txt product j2k.mxf trt
REM ----------------------------------0\
REM observed to work
echo *******************************************************************************
REM SetLocal EnableDelayedExpansion
REM the app is in C:\v_util
set mi_exe=C:\V_util\MediaInfo.exe
REM actual on strmz_#
REM set cap_folder=F:\capture
REM ----------------on test mach
set cap_folder=F:\fCap
REM actual on strmz_#
REM set prod_folder=E:REM set prod_folder=E:REM ----------------on test mach
set prod_folder=F:
For %%a in ("%cap_folder%\*.mov") Do (
REM cap mov trt
"%mi_exe%" --Inform=General;%%Duration/String1%% "%%a">"C:\03_t\trt1.txt"
echo did %%a
set /p trt01=<C:\03_t\trt1.txt
echo trt of cap is %trt01%
echo %trt01% is the capture >>"C:\03_t\rLog.txt"
REM dv50 mov
"%mi_exe%" --Inform=General;%%Duration/String1%% "%prod_folder%\%%~na.mov">"C:\03_t\trt7.txt"
echo did %%~na.mov
set /p trt02=<C:\03_t\trt2.txt
echo trt of dvm is %trt02%
echo %trt02% is the dv50 >"C:\03_t\rLog.txt"
REM j2k mxf
"%mi_exe%" --Inform=General;%%Duration/String1%% "%prod_folder%\%%~na.j2k.mxf">"C:\03_t\trt3.txt"
echo did %%~na.j2k.mxf
set /p trt03=<C:\03_t\trt3.txt
echo trt of mxf is %trt03%
echo %trt03% is the mxf >>"C:\03_t\rLog.txt"
)
REM # legacy
REM "%mi_exe%" --Inform=General;%%FileName%%,%%Duration%% "%%~x">>"C:\03_t\trt1.txt"
REM *************************************************
echo you may close this shell
pause