I need to update multiple SVN working copies. I want to write this to a log file, but it isn't possible, because one SVN update takes only a few seconds and a different one maybe up to minutes.
Due of that, I'm always getting the following message:
The process cannot access the file because it is being used by another process.
I'm using this code:
@echo off
echo.
:: Setting Variables
set SVN_BIN=C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
set LOG_FILE=D:\BatchScripts\logs\svn-update.log
set CMD_TITLE="SVNUpdate"
set SOURCE1=D:\www\upload.example.com\
set SOURCE2=D:\www\download.example.com\
set SOURCE3=D:\www\client.example.com\
::
::
echo. %DATE% %TIME% Updating %SOURCE1% using SVN... >> "%LOG_FILE%"
START "%CMD_TITLE%" "%SVN_BIN%" /command:update /path:"%SOURCE1%" /closeonend:1 >> "%LOG_FILE%"
::
echo. %DATE% %TIME% Updating %SOURCE2% using SVN... >> "%LOG_FILE%"
START "%CMD_TITLE%" "%SVN_BIN%" /command:update /path:"%SOURCE2%" /closeonend:1 >> "%LOG_FILE%"
::
echo. %DATE% %TIME% Updating %SOURCE3% using SVN... >> "%LOG_FILE%"
START "%CMD_TITLE%" "%SVN_BIN%" /command:update /path:"%SOURCE3%" /closeonend:1 >> "%LOG_FILE%"
::
echo. %DATE% %TIME% Operation complete. >> "%LOG_FILE%"
How can I archive to write a log file? The script will be executed every 5 minutes using Windows task scheduler.
The START
parameter /wait
does not help or fix the problem, but it does slow down the update process a lot, because it always waits for the current SVN update to finish and then, it will start the next update. That's not, what I want.