I have a backup script that calls SVN dump, outputs stderr to a file then pipes the output to 7zip.
I now have to port this system to windows using a batch file but I cannot seem to get access to the file twice in the one line like linux will let me, is there an alternative syntax?
svnadmin dump D:\Repo\example 2>> %logfile% | 7za a new.7z >> %logfile%
(above is just an example)
In windows if I try to do this I get an error that the file is already being accessed. How can I make sure I get error both from the svnadmin and also from the 7za to my logfile?
You can also use a block to redirect both to the logfile directly.
Redirecting the stdout with
1>>&2to stderr and then combine both with the parenthesis and redirect it with a single2>>to the logfile.