Code: Select all
cmd /c jrepl.bat . "" /P "(.+)\r\n(.*)" /PFLAG "" /PREPL "$1+$2" /M /F "a.txt" /O "b.txt"
Moderator: DosItHelp
Code: Select all
cmd /c jrepl.bat . "" /P "(.+)\r\n(.*)" /PFLAG "" /PREPL "$1+$2" /M /F "a.txt" /O "b.txt"
Code: Select all
C:\Users\Vini\AppData\Local\Temp\jrepl.bat.14.06.2022_ 2.21.56,50_27286.temp"\\"!")" kann syntaktisch an dieser Stelle nicht verarbeitet werden.
That's true. Once I had the same issue in a pipe which looks like this:
Code: Select all
C:\Temp>type z.bat
@echo:%RANDOM%>&2
C:\Temp>z | z
1826
1826
Before I dive in, did you find a solution or not?siberia-man wrote: ↑14 Jun 2022 03:22By the following link you can find the long discussion how we tried to fix it. viewtopic.php?f=3&t=6133&hilit=cmdpid
Code: Select all
for /r "Installers" %%i in (*.iss) do call %jrepl_cmd% "(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})" %FINALVERSION% /f "%%~i" /o -
Code: Select all
@echo off &setlocal
echo ============================================================
tree "%cd%" /f
echo ============================================================
for /r "Installers" %%i in (*.iss) do echo "%%~i"
echo ============================================================
pause
Code: Select all
============================================================
Auflistung der Ordnerpfade für Volume Windows-SSD
Volumeseriennummer : D470-BFC1
C:\USERS\STEFFEN\DESKTOP\TEST
│ test.bat
│
└───Installers
├───M1
│ M1Installer_Release.iss
│
└───T1
T1Installer_Release.iss
============================================================
"C:\Users\steffen\Desktop\test\Installers\M1\M1Installer_Release.iss"
"C:\Users\steffen\Desktop\test\Installers\T1\T1Installer_Release.iss"
============================================================
Drücken Sie eine beliebige Taste . . .
Code: Select all
@echo off &setlocal
echo ===========================================================================
REM Print the file tree rooted in the parent directory
tree "%cd%\.." /f
REM location of JREPL.bat is the grandparent folder in my case (my desktop)
set jrepl_cmd="..\..\JREPL.bat"
REM I *guess* something about like that is how FINALVERSION is assigned based on what the
REM search pattern indicates, and based on the fact that you didn't quote %FINALVERSION%
REM in the command line
set FINALVERSION="4.55.6.7"
REM Find *.iss files
echo ===========================================================================
for /r "..\Installers" %%i in (*_Release.iss) do (
echo *************************************************************************
REM See which file is found
echo found:
echo "%%~i"
echo -----------------------------------------------------------------------
REM For test purposes, write some content into the found file containing a version numbering
>"%%~i" echo foo version 4.33.222.1 bar baz
REM Print the current content
echo content before:
type "%%~i"
echo -----------------------------------------------------------------------
REM For debugging purposes, output the JREPL command line using ECHO,
REM deliberately having CALL still the first command because it *may* alter string contents
call echo %jrepl_cmd% "(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})" %FINALVERSION% /f "%%~i" /o -
REM Actually call JREPL.bat to replace the version
call %jrepl_cmd% "(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})" %FINALVERSION% /f "%%~i" /o -
echo -----------------------------------------------------------------------
REM Print the new content
echo content after:
type "%%~i"
)
echo ===========================================================================
pause
Code: Select all
===========================================================================
Auflistung der Ordnerpfade für Volume Windows-SSD
Volumeseriennummer : D470-BFC1
C:\USERS\STEFFEN\DESKTOP\TEST
├───foo
│ test.bat
│
└───Installers
├───M1
│ M1Installer_Release.iss
│
└───T1
T1Installer_Release.iss
===========================================================================
*************************************************************************
found:
"C:\Users\steffen\Desktop\test\Installers\M1\M1Installer_Release.iss"
-----------------------------------------------------------------------
content before:
foo version 4.33.222.1 bar baz
-----------------------------------------------------------------------
"..\..\JREPL.bat" "(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})" "4.55.6.7" /f "C:\Users\steffen\Desktop\test\Installers\M1\M1Installer_Release.iss" /o -
-----------------------------------------------------------------------
content after:
foo version 4.55.6.7 bar baz
*************************************************************************
found:
"C:\Users\steffen\Desktop\test\Installers\T1\T1Installer_Release.iss"
-----------------------------------------------------------------------
content before:
foo version 4.33.222.1 bar baz
-----------------------------------------------------------------------
"..\..\JREPL.bat" "(\d{1,})\.(\d{1,})\.(\d{1,})\.(\d{1,})" "4.55.6.7" /f "C:\Users\steffen\Desktop\test\Installers\T1\T1Installer_Release.iss" /o -
-----------------------------------------------------------------------
content after:
foo version 4.55.6.7 bar baz
===========================================================================
Drücken Sie eine beliebige Taste . . .