Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Batch file 如果文件不存在,则发送电子邮件的批处理脚本_Batch File - Fatal编程技术网

Batch file 如果文件不存在,则发送电子邮件的批处理脚本

Batch file 如果文件不存在,则发送电子邮件的批处理脚本,batch-file,Batch File,我想要一个批处理脚本,用于检查文件夹中最近7天的文件(*.txt)。如果文件存在,将忽略并退出。如果在过去7天内没有文件,请向发送警报电子邮件xxx@xxx.xxx 谢谢, 杰伊 查找在过去7天内修改的文件: forfiles /D -7 /M *.txt 找一个可以发送电子邮件的程序。有一些链接。然后它就变成了: forfiles /D -7 /M *.txt /C "send_mail ..." 我会选择powershell脚本,如果不可能,则选择vbs脚本。

我想要一个批处理脚本,用于检查文件夹中最近7天的文件(*.txt)。如果文件存在,将忽略并退出。如果在过去7天内没有文件,请向发送警报电子邮件xxx@xxx.xxx

谢谢, 杰伊

  • 查找在过去7天内修改的文件:

    forfiles /D -7 /M *.txt
    
  • 找一个可以发送电子邮件的程序。有一些链接。然后它就变成了:

    forfiles /D -7 /M *.txt /C "send_mail ..."
    

  • 我会选择powershell脚本,如果不可能,则选择vbs脚本。