Re: Can Blat be used when name of the attached file is unknown?
| Newsgroups | gmane.mail.blat |
|---|---|
| Message-ID | <48E53BB607744965AD9F1CB230ACD223@chip> |
>>> We have a POS Program that creates .txt Files with sales results at the >>> End of Day Routine. These Files have names like Print2070602.txt. >>> >>> I would like to see if we can send Emails with Blat by pointing to the >>> directory, f.i. C:\POS\PrintFIles\ with some kind of a Wildcard (*.txt). >>> Looks like this is not supported. Any idea how to succeed? >>> >>> The command line blat C:\POS\Printfiles\*.txt results in 'unknown error >>> code 123 when trying to open C:\POS\PrintFiles\*.txt >> You can send attachments with a wildcard, but when sending as a message >> body. The problem for me would be how to send multiple files as the >> message body when there exists more than one file which matches the >> wildcard string. >> >> This line is a start to get your print files sent. You still need the -to >> and -subject entries as a minimum. >> >> Blat - -body "Here are today's print files." -attach >> C:\POS\Printfiles\*.txt > Thanks. > > That is doable. Still would prefer the text to appear in the message body > though. > > The POS application itself takes care that older printfiles will be > deleted or moved to another directory, so this is nothing to worry about. > > I tried successfully to rename the original print file on the batch i use > to call Blat. That's basically working, but in order to use it I'd love to > be able to add a string for current Date in the Subject line. > If you can use a batch file for sending emails, then it is easy to use wildcards for the message body. It is also very easy to add the date to your subject line. Here is a simple batch line to give you both items you desire: for %%f in (C:\POS\Printfiles\*.txt) do Blat.exe %%f -to somebody -subect "Here is the Point Of Sale print file for %DATE%" -- Chip