I am using TheBat! (and it works successfully) to grab files from a folder, make the file into the attachment, and then send the file by email, to the email address that is in part of the file name, for example: alex111@hotmail.com~~mylifestory.txt.
It works with the help of the files shown below.
My question is; can these files be modified to do the following: After TheBat! puts the email address portion of the file name into the Send To: line,
can TheBat! remove the email address (and ~~) from the file name, (the attachment name), so that the attchment is just named mylifstory.txt?
Currently using these:
Sendfile.cmd:
For %%i in ("C:\Documents and Settings\Desktop\BAT\XXX\*.txt") do "C:\Program Files\The Bat!\thebat.exe" /MailT="C:\Documents and Settings\Desktop\BAT\Sendfile.tpl";A="%%i";To="%%i";Send
And a Sendfile.tpl:
%SetPattRegExp='C:\\Documents and Settings\\Desktop\\BAT\XXX\\(.*?)~~(.*?)\.txt'%-
%RegExpBlindMatch='%To'%-
%ModifyOnce(To)%-
%SetHeader(To,%SubPatt='1')%-
%Subject="Hello."
Hi %ABToFirstName="%ToFName",
Thank you.
Regards, %FromFName
And this Sorting Office template:
copy "C:\Documents and Settings\Desktop\BAT\XXX\%Attachments"
"C:\Documents and Settings\brian\Desktop\BAT\Sent"
del "C:\Documents and Settings\Desktop\BAT\XXX\%Attachments"
T
It works with the help of the files shown below.
My question is; can these files be modified to do the following: After TheBat! puts the email address portion of the file name into the Send To: line,
can TheBat! remove the email address (and ~~) from the file name, (the attachment name), so that the attchment is just named mylifstory.txt?
Currently using these:
Sendfile.cmd:
For %%i in ("C:\Documents and Settings\Desktop\BAT\XXX\*.txt") do "C:\Program Files\The Bat!\thebat.exe" /MailT="C:\Documents and Settings\Desktop\BAT\Sendfile.tpl";A="%%i";To="%%i";Send
And a Sendfile.tpl:
%SetPattRegExp='C:\\Documents and Settings\\Desktop\\BAT\XXX\\(.*?)~~(.*?)\.txt'%-
%RegExpBlindMatch='%To'%-
%ModifyOnce(To)%-
%SetHeader(To,%SubPatt='1')%-
%Subject="Hello."
Hi %ABToFirstName="%ToFName",
Thank you.
Regards, %FromFName
And this Sorting Office template:
copy "C:\Documents and Settings\Desktop\BAT\XXX\%Attachments"
"C:\Documents and Settings\brian\Desktop\BAT\Sent"
del "C:\Documents and Settings\Desktop\BAT\XXX\%Attachments"
T