@echo off
setlocal enabledelayedexpansion
set from=Kindlekindle设置好信任的邮箱set pw=密码
set to=Kindle邮箱
cd /d 脚本的位置
for /f "delims=" %%a in ('dir /s/a-d /b *.recipe') do (
set fileName=%%~na
set reF=%%a
set moF="%dir%!fileName!.mobi"
del !moF!
"xxCalibre2ebook-convert.exe" "!reF!" !moF!
"xxCalibre2calibre-smtp.exe" -e SSL -r smtp.163.com -u %from% -p %pw% --port 465 -v -s "!fileName!" %from% %to% "mailBody" -a !moF!
)
"xxSvnCommitHelper.exe"
ps:最后一行是自动提交,来自 http://www.cnblogs.com/ivony/archive/2010/11/10/1874089.html
为了避免因为失败等导致错过章节,将此代码以及脚本、以及生产的mobi文件都放入了svn控制下