File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ FOR /F " usebackq delims=" %%L IN (" ..\approvaltests-tests\.approval_tests_temp\.failed_comparison.log" ) DO (
4+ REM Store the entire line in an environment variable named LINE
5+ SET " LINE = %%L "
6+ REM Call a subroutine to parse and handle the line
7+ CALL :ProcessLine
8+ )
9+
10+ GOTO :EOF
11+
12+ :ProcessLine
13+ REM Enable delayed expansion so we can safely manipulate LINE
14+ SETLOCAL ENABLEDELAYEDEXPANSION
15+
16+ REM Replace " -> " with a pipe character so we can split easily
17+ SET " LINE = !LINE: -> =| ! "
18+
19+ REM Now split the line on the pipe and capture each side
20+ FOR /F " tokens=1,2 delims=|" %%A IN (" !LINE! " ) DO (
21+ ECHO Moving " %%~A " to " %%~B "
22+ MOVE " %%~A " " %%~B "
23+ )
24+
25+ ENDLOCAL
26+ GOTO :EOF
You can’t perform that action at this time.
0 commit comments