Making Batch Code friendly for Powershell


April 2019


10 time


I am trying to make the batch file code below friendly for powershell but I am not sure what syntax to use to make it work. Please assume that the variables have already been set.

ruby "%FolderOne%\script.rb %FolderOne%\framework_properties.txt 2>&1  | tee -a  %FolderOne%\Logs\%LOG_NAME% "

I put quotes around the string but i am getting run-time syntax error. Thanks for your help.

Also I am trying to make this code work for Powershell too:

 for /f "delims=" %%A in ('cscript %PROD_DIR%\run_log.vbs') do set LOG_NAME=%%A & echo LOG_NAME = %LOG_NAME% 


0 answers