- Click Start
- Click Run
- Type: notepad and press enter.
- Once notepad is open, type the below lines in the file or copy and paste the below lines into notepad.
@ECHO off
color DE
title Krishnaa
SET T1= Done By Krishnaa
"C:\Program Files\WinRar\rar.exe" a -agyyyy-MM-dd -r "E:\backup\" "E:\BACKUP.DMP" -iemlYOURMAIL@xxxx.COM
EXIT
- Click File and click Save; browse to where you want to save the file. For the file name, type "automail.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it will save as a text file. Once all of this has been done click the Save button and exit notepad.
- Now, to run the batch file, simply double-click or run the file like any other program. Once the batch file has completed running it will close the window automatically.
E:\backup\ = Archive Directory
E:\BACKUP.DMP = Compress & send attachment file under backup directory
YOURMAIL@xxxx.COM = send to email address