@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的更多相关文章

随机推荐

  1. AI学习路径

  2. POJ-3083 Children of the Candy Corn (BFS+DFS)

    Description The cornfield maze is a popular Halloween treat. Visitors are shown the entrance and mus ...

  3. pytorch人脸识别——自己制作数据集

    这是一篇面向新手的博文:因为本人也是新手,记录一下自己在做这个项目遇到的大大小小的坑. 按照下面的例子写就好了 import torch as t from torch.utils import da ...

  4. 在linux下出现cannot restore segment prot after reloc: Permission denied

    应用程序连接oracle的库时会出现如下错误:XXXXX:: error while loading shared libraries: /usr/local/oracle/product/10.2. ...

  5. 网络编程基础——System.Net.Socket 命名空间及相关类的使用

    System.Net.Socket 命名空间主要提供制作 Socket 网络应用程序的相关类.(Socket 类.TcpClient 类.TcpListener 类 和 UdpClient 类) 1. ...

  6. 关于向后台请求数据(get请求,无参数传递),返回html代码(实际需要返回的是json数据)的解决方案

    this.$http.get(apis.schoolVideo, { headers: { 'X-Requested-With': 'XMLHttpRequest' } }) 待续

  7. RowMapper使用

    public class ABRow implements RowMapper<AABB> { private String CMC; @Override public AABB mapR ...

  8. PHP:第三章——PHP中表达式函数和匿名函数

    <?php header("Content-Type:text/html;charset=utf-8"); //表达式函数和匿名函数 /*$A=function(){ ech ...

  9. DevExpress v18.1新版亮点——WinForms篇(三)

    用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容.本文将介绍了DevExpress WinForms v18.1 的新功能,快来下载试用新版本! ...

  10. css 课堂笔记

    css:层叠样式表  Cascading( [kæ'skeɪdɪŋ] 级联)Style Sheet css基本语法结构:选择器{ 属性:值; 属性:值: ... } 三种主要的选择器: 标签选择器: ...