Hello Roelof You were very kind to write the batch file below, but unfortunately I'm very unfamiliar with writing/using batch files, however your input and that of others in this discussion group have been very helpful.
I've figured out how to set up the Bat for want I want to do, except for one thing, which is something you were able to create in your previous response, which I copied below. In your prior message below, you wrote a batch file that allows one to have all the *.wav files in a particular directory deleted after they are sent/attached to emails that are automatically forwarded to others. That batch file is exactly what I'm looking for, but I have no idea how to incorporate a batch file into the Bat. Do I just insert the code below into my template, substituting my own paths, etc., or does this info get pasted somewhere else? --begin autowav.bat----------------------------- g: cd\autofoto for %%f in (*.wav) do c:\progra~1\thebat~1\thebat.exe/maila=g:\autofoto\%%f;t=g:\autofoto\sillytex t.txt;s="Voicemail for Carlton in file %%f" del *.wav --end of autowav.bat---------------------------- I'm also not sure about the second command in the above batch file Do I use c:\progra~1\thebat~.... or the path to The Bat on my system? I've never created/used a batch file before, so this is new for me, but I'm very interested, since it appears to be able to do what I need. By the way, I'm using the 30-day trial version of the Bat until I know I can do with it what I want, and then I will buy it. I have set up alot of filters & directories with my trial version that I don't want to lose after the 30-days expires, and I'm not sure I will be able to properly test everything within the 30 days. Do you know what happens after the 30 days? I don't want to lose all my settings, filters and directories (there are 96). Thank you Roelof, Carlton ----- Original Message ----- From: "Roelof Otten" <[EMAIL PROTECTED]> To: "C.R." <[EMAIL PROTECTED]> Sent: Thursday, May 09, 2002 9:56 AM Subject: Re: Converting incoming html email to Plain Text or omitting it altogether > Hello Carlton, > > On Thu, 9 May 2002 05:37:23 -0700GMT (9-5-02, 14:37 +0200GMT, where I > live), you wrote: > > CR> incoming email before I receive it. The problem is that I'm > CR> receiving emails with a *.wav attachment that I want to forward to > CR> others, but the Bat is also sending a second attachment, which is > CR> the message's html, and it contains info > > You cannot separate the html-attachment and the wav-attachment when > you're forwarding. (That would've been best.) > However you can separate the attachments when you're saving them to > file, because then they're separate files. > > Therefore, the first thing is to save them to disk (save attachment to disk, can > be done in a filter), see my filter wav1 at the bottom of my message. > > OK, so now you've got a wav that needs to be sent. You can send files > with TB by attaching them to a message. However you need the name of > the file to do this. So we'll create a batchfile that finds the name > of the saved wav-file and creates a message from the commandline and > attaches your wav. We can run a external program (including > batchfiles) from a filter. See my filter wav2. > > I'll go bit further into the needs of the batch-file first. Here's my > example, it's an adapted version of the batch-file that I use to > distribute pictures. > > --begin autowav.bat----------------------------- > g: > cd\autofoto > for %%f in (*.wav) do c:\progra~1\thebat~1\thebat.exe/maila=g:\autofoto\%%f;t=g:\autofoto\sillytex t.txt;s="Voicemail for Carlton in file %%f" > del *.wav > --end of autowav.bat---------------------------- > > Notes > The batchfile is called autowav.bat, so that's the name the filter has > to call. > The directory I was using was g:\autofoto, that's the reason for the > first two commands. > The second command is a for-loop that runs TB with the mentioned > parameters for every *.wav in the directory > I create a new message with thebat.exe/mail > to attach a file that's followed by a=filepath\filename > the filepath is the directory you've saved your .wav > the filename is inserted by the %%f parameter (that's dos) > the textbody is taken from the file indicated with t=path\file > I've inserted the wav-name in the subject, that's the reason for s=path\name > I haven't done any addressing yet, but I'll do that in > sillytext.txt, because that's a place where I can use all TB's > macros, and I suppose the recipient is always the same person/group > The last command is del *.wav, that's to delete all wav-files from > your directory so you won't send them twice. I don't know how often > you receive these messages or specifically how many at the same time, > but if you're receiving them more than one at a time the batch-file > needs some tweaking. > > The messagebody/template: > ---begin of sillytext.txt-------------------------------------- > %from="Voicemail service <[EMAIL PROTECTED]>"%- > %to="[EMAIL PROTECTED]"%- > Hello, > > Here's another silly voicemail message. > > The Bat!, Carlton's voicemail servant > ---end of sillytext.txt----------------------------------------- > > Notes > I need a from-address, that's the reason for %from > I need a to-address, that's the reason for %to > The %- are included to prevent the occurring of empty lines. > The rest is just a silly text. ;-) > > Now you've succeeded into separating the .wav from the rest of the > message, to attach it to a new message. Now it has to be sent, because > it's still residing in your outbox. > It depends on your needs of course, because when you're doing combined > collect/deliveries and you're collecting every five minutes, it's not > really necessary to send it right away. > Anyhow I want to send now. > First I thought to achieve this by adding the command: > c:\progra~1\thebat~1\thebat.exe/send* > Because that's what I'm doing when distributing my photos. But because > the batchfile is run from the sorting office and that's being run from > the connection centre that doesn't work. (TB thinks don't bother me, > I'm sending already.) > So I created another filter that's being triggered by the same > condition as the first two. (See wav3) It's creating a short message > and it has as option 'Send generated messages: Immediately' (No, this > option won't work for the second filter.) > > General notes on the filters. > Because the same message has to trigger three filters, the first to > filters must have checked at options: 'Continue processing with other > filters.' > > Now the 'pasted' filters: > > BeginFilter > Name: wav1 > Active: 1 > Source: \\roelof\Inbox > Target: \\roelof\Inbox > CopyFolder: \\\\none > MainSet: 20wav-test > Actions: faoContinueProcessing,faExtractFiles > AddGroups: > DelGroups: > ForwardTemplate: > ConfirmTemplate: > ReplyTemplate: > FwdAddr: > RedirectAddr: > NewAddr: > NewTemplate: > ExtCmd: > ExtFile: > ExtractDir: G:\autofoto > ColourGroup: <default> > AddAddrItems: afiFrom, > DelAddrItems: afiFrom, > HotKey: 0 > IsOfColour: <default> > SizeBigger: 0 > SizeSmaller: 0 > AgeOlder: 0 > AgeNewer: 0 > InAddrPos: 0 > OutAddrPos: 0 > InAddrGroups: > NoAddrGroups: > KillFile: > KillMethod: 0 > SaveTemplate: > SndFile: > SysSound: 0 > SoundTime: 0:00-0:00 > AllowTime: 0:00-0:00 > EndFilter > > BeginFilter > Name: wav2 > Active: 1 > Source: \\roelof\Inbox > Target: \\roelof\Inbox > CopyFolder: \\\\none > MainSet: 20wav-test > Actions: faExternal,faoContinueProcessing > AddGroups: > DelGroups: > ForwardTemplate: > ConfirmTemplate: > ReplyTemplate: > FwdAddr: > RedirectAddr: > NewAddr: > NewTemplate: > ExtCmd: G:\autofoto\autowav.bat > ExtFile: > ExtractDir: > ColourGroup: <default> > AddAddrItems: afiFrom, > DelAddrItems: afiFrom, > HotKey: 0 > IsOfColour: <default> > SizeBigger: 0 > SizeSmaller: 0 > AgeOlder: 0 > AgeNewer: 0 > InAddrPos: 0 > OutAddrPos: 0 > InAddrGroups: > NoAddrGroups: > KillFile: > KillMethod: 0 > SaveTemplate: > SndFile: > SysSound: 0 > SoundTime: 0:00-0:00 > AllowTime: 0:00-0:00 > EndFilter > > BeginFilter > Name: wav3 > Active: 1 > Source: \\roelof\Inbox > Target: \\roelof\Inbox > CopyFolder: \\\\none > MainSet: 20wav-test > Actions: faNewMsg,faoSendNow > AddGroups: > DelGroups: > ForwardTemplate: > ConfirmTemplate: > ReplyTemplate: > FwdAddr: > RedirectAddr: > NewAddr: [EMAIL PROTECTED] > NewTemplate: Hey\20Boss,\0D\0A\0D\0AYou\27ve\20got\20voicemail.\0D\0A > ExtCmd: > ExtFile: > ExtractDir: > ColourGroup: <default> > AddAddrItems: afiFrom, > DelAddrItems: afiFrom, > HotKey: 0 > IsOfColour: <default> > SizeBigger: 0 > SizeSmaller: 0 > AgeOlder: 0 > AgeNewer: 0 > InAddrPos: 0 > OutAddrPos: 0 > InAddrGroups: > NoAddrGroups: > KillFile: > KillMethod: 0 > SaveTemplate: > SndFile: > SysSound: 0 > SoundTime: 0:00-0:00 > AllowTime: 0:00-0:00 > EndFilter > > > Good hunting. > > BTW I checked the whole setup, it works here. > > BTW2 My trigger for the filters was wav-test in the subject. > > BTW3 If you think it's sufficient to send the .wav's once or twice a > day, you can skip filter two and three and start the batch-file > from a schedule in Windows taskmanager. In that case you can use > the 'c:\progra~1\thebat~1\thebat.exe/send*' command as end of > your batch-file. > > -- > Groetjes, Roelof > > > ________________________________________________________ > Current Ver: 1.60i > FAQ : http://faq.thebat.dutaint.com > Unsubscribe: mailto:[EMAIL PROTECTED] > Archives : http://tbudl.thebat.dutaint.com > Moderators : mailto:[EMAIL PROTECTED] > TBTech List: mailto:[EMAIL PROTECTED] > Bug Reports: https://bt.ritlabs.com > ________________________________________________________ Current Ver: 1.60m FAQ : http://faq.thebat.dutaint.com Unsubscribe: mailto:[EMAIL PROTECTED] Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Bug Reports: https://bt.ritlabs.com

