File:  [mozdev] / booksync / www / booksync3.bat
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Nov 15 12:40:41 2003 UTC (13 years, 11 months ago) by simon
Branches: MAIN
CVS tags: HEAD
*** empty log message ***

@echo off
rem setup following paths
set ftpserver=ftp.xxx.com
set ftpuser=your_ftp_user
set ftppass=your_ftp_password
set ftpdir=your ftp path or . means current directory
set bookdir=c:\Documents and Settings\[your_user]\Application Data\Phoenix\Profiles\default\8pb0km1y.slt
set moz=c:\Program Files\Mozilla.org\Firebird0.7\MozillaFirebird.exe
rem ------- setup previous paths
if not exist "%bookdir%\bookmarks.html" goto err1
if not exist "%moz%" goto err2
set up_down=down
if "%1"=="up" set up_down=up
copy /y "%bookdir%\bookmarks.html" "%bookdir%\bookmarks.html.bk" > nul
echo open %ftpserver%> %temp%\boksynctmp
echo %ftpuser%>> %temp%\boksynctmp
echo %ftppass%>> %temp%\boksynctmp
echo bi>> %temp%\boksynctmp
echo cd %ftpdir%>> %temp%\boksynctmp
if "%up_down%"=="down" echo get bookmarks.html "%temp%\bookmarks.html" >> %temp%\boksynctmp
if "%up_down%"=="up"   echo put "%bookdir%\bookmarks.html" bookmarks.html >> %temp%\boksynctmp
echo by>> %temp%\boksynctmp
ftp -s:%temp%\boksynctmp
echo ERRORLEVEL=%errorlevel%
del /f /q %temp%\boksynctmp > nul
if not exist "%temp%\bookmarks.html" goto cont
findstr bookmark "%temp%\bookmarks.html" && copy /y "%temp%\bookmarks.html" "%bookdir%\bookmarks.html"
:cont
if "%up_down%"=="down" "%moz%" %2 %3 %4 %5 %6 %7 %8 %9
if "%up_down%"=="down" call %0 up
goto end
:err1
echo Err: local bookmark not set, please search bookmarks.html, set path on bookdir
goto end
:err2
echo Err: mozilla executable file not exist!, please set bookdir
goto end
:end
set ftpserver=
set ftpuser=
set ftppass=
set ftpdir=
set bookdir=
set moz=

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>