BatSendMail
@echo off
echo ==================================
echo == Compress Files And Send Mail ==
echo ==================================
echo.
echo.
call :Check "%~1"
echo 1
if not "%TargetPath%"=="" call :SetEnv "%TargetPath%"
goto :eof
:Check
if "%~1"=="" (call :help & goto :eof
)else if "%~1"=="/?" (
call :help & goto :eof
) else (
for /f "tokens=1,* delims=:" %%m in ("%~1") do (
set TargetPath=%%~n
echo %%m
echo %%n
)
goto :eof)
::call :SetEnv %str% & goto :end)
goto :eof
rem 设置所有常量;
:SetEnv
echo SetEnv----------%1
set LOCALPATH=%~1
if not "%LOCALPATH:~-1%"=="\" set LOCALPATH=%LOCALPATH%\
set LOCAL_TEMP="%LOCALPATH%..\TempMail"
md %LOCAL_TEMP%
set CMD_7Z=.\software\7-Zip\7z.exe
set CMD_BLAT=.\software\Blat\blat.exe
set MAIL_SMTP_HOST=xxx.xxx.xxx.xxx
set MAIL_SENDER=wei.x.yi@xxx.com
set MAIL_TO=wei.x.yi@xxx.com,qm785462@xxx.com
set MAIL_BODY=""
set MAIL_HEAD=""
goto :eof
:Help
echo /d:[compress path] & goto :eof
echo use /d parameters set compress all path.
echo The path is folder or file.
echo If the path include spase, then use double quotes in this path.
echo.
echo example:
echo /d:c:\temp or /d:c:\temp\ or "/d:C:\Program Files\Java"
goto :eof
:end
BatSendMail的更多相关文章
随机推荐
- Javascript基础一(2)
循环语句 1.for循环 <script> //从1乘到100: //计数器 // var product = 1; // for(var i=1;i<=10;i++){ // pr ...
- 『科学计算』图像检测微型demo
这里是课上老师给出的一个示例程序,演示图像检测的过程,本来以为是传统的滑窗检测,但实际上引入了selectivesearch来选择候选窗,所以看思路应该是RCNN的范畴,蛮有意思的,由于老师的注释写的 ...
- python-day27--configparser模块
1.来看一个好多软件的常见文档格式如下: [DEFAULT] ServerAliveInterval = 45 Compression = yes CompressionLevel = 9 Forwa ...
- POJ-2415 Hike on a Graph (BFS)
Description "Hike on a Graph" is a game that is played on a board on which an undirected g ...
- JAVA 中CLOB与Clob有区别
在JAVA中CLOB与Clob是有区别的类型. (oracle.jdbc.internal.OracleCallableStatement)OracleCallableStatement能接收CLOB ...
- @Component、@Service、@Constroller
@Component.@Service.@Constroller,@Repository,它们分别用于软件系统的不同层次: @Component 是一个泛化的概念,仅仅表示一个组件 (Bean) ,可 ...
- C++对象模型——默认构造函数的合成
最近在学习C++对象模型,看的书是侯捷老师的<深度探索C++对象模型>,发现自己以前对构造函数存在很多误解,作此笔记记录. 默认构造函数的误解 1.当程序猿定义了默认构造函数,编译器就会直 ...
- Our supersheet
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- bzoj3946
题解: 树套树 treap+线段树 treap就把线段树上的节点弄一下 然后修改的时候 把中间的一段一起加 把两头重新计算(二分+hash) 代码: #include<bits/stdc++.h ...
- sgu187&&spoj7734
题解: splay翻转(只有翻转 sgu ac,spoj tle 代码: #pragma GCC optimize(2) #include<cstdio> #include<cstr ...