View Single Post
  #15  
Old 10-23-2012, 03:28 PM
TheGrunch's Avatar
TheGrunch TheGrunch is offline
Approved Member
 
Join Date: Oct 2009
Location: United Kingdom
Posts: 843
Default

Here's an example cobbled together which uses a mirrorlist.txt file:

Code:
@echo off
set index=1

if not exist il2fb.exe goto :noexeerror

echo Sync IL-2 1946 with mirror:

setlocal enabledelayedexpansion
for /f "tokens=*" %%f in (mirrorlist.txt) do (
set url!index!=%%f
echo !index! - %%f
set /a index=!index!+1
)

setlocal disabledelayedexpansion

set /p selection= Please enter mirror number: 
set url%selection% >nul 2<&1

if errorlevel 1 (
	echo Invalid number selected!
	pause
	goto :eof
)

call :resolve %%url%selection%%%

echo Selected mirror: %mirror%
echo Replace this command with sync command for %mirror%

pause

goto :eof

:resolve
set mirror=%1
goto :eof

:noexeerror
echo Please run from the main IL-2 1946 directory!
pause
mirrorlist.txt is simply any text file with a single URL to each line. The bold line should be replaced with a reference to the sync software. There are several pieces of software which will do this kind of task easily from a command line in Windows, but Duplicati seems the most complete.
Reply With Quote