Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: find files older than 7 days and send email  (Read 3101 times)

0 Members and 1 Guest are viewing this topic.

Blisk

    Topic Starter


    Intermediate

    Thanked: 1
    • Experience: Familiar
    • OS: Windows 7
    find files older than 7 days and send email
    « on: April 29, 2017, 12:14:24 PM »
    I need a simple batch to find files which are older than 7 days.
    if there is no file older than 7 days than email me.
    for email I use simple command line software

    bmail -s mail.mailserver.com -f %username%@mailserver.com -t [email protected] -h -a "Archives missing" -b "" -m path.txt"

    In file path.txt are full paths to users archive folder.

    I tried with 2 batch files but not working

    Code: [Select]
    forfiles /P ".\logfiles" /S /M *.txt /D -7 /C "start /w mail.bat"