Windows Batch for Pipe out Variable -
how can value myvar
attribute use in other part of code.
set myvar = echo "httpsxxxxxx_cmidxxxxx_2014-04-12_14-54-53_abc3654.xml" | find /i "2014-04-12" | (set /p myvar= & set myvar) echo myvar "%myvar%" /**** empty string**********/
try :
@echo off /f "delims=" %%a in ('echo "httpsxxxxxx_cmidxxxxx_2014-04-12_14-54-53_abc3654.xml" ^| find /i "2014-04-12"') set myvar=%%a echo %myvar%
i don't anderstand trying do.
but assuming you're looking .xml
file contain string "2014-04-12"
in directory. code :
@echo off /f "delims=" %%a in ('dir /b/a-d *.xml ^| find /i "2014-04-12"') set myvar=%%a
Comments
Post a Comment