-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@echo off | ||
|
||
FOR /F "usebackq delims=" %%L IN ("..\approvaltests-tests\.approval_tests_temp\.failed_comparison.log") DO ( | ||
REM Store the entire line in an environment variable named LINE | ||
SET "LINE=%%L" | ||
REM Call a subroutine to parse and handle the line | ||
CALL :ProcessLine | ||
) | ||
|
||
GOTO :EOF | ||
|
||
:ProcessLine | ||
REM Enable delayed expansion so we can safely manipulate LINE | ||
SETLOCAL ENABLEDELAYEDEXPANSION | ||
|
||
REM Replace " -> " with a pipe character so we can split easily | ||
SET "LINE=!LINE: -> =|!" | ||
|
||
REM Now split the line on the pipe and capture each side | ||
FOR /F "tokens=1,2 delims=|" %%A IN ("!LINE!") DO ( | ||
ECHO Moving "%%~A" to "%%~B" | ||
MOVE "%%~A" "%%~B" | ||
) | ||
|
||
ENDLOCAL | ||
GOTO :EOF |