| Newsgroups |
gmane.mail.blat |
| Organization |
Willms-EDV - Lüko Willms |
| Message-ID |
<[email protected]> |
Guten Tag [email protected] [blat],
am Dienstag, 14. November 2017 um 02:31 schrieben Sie:
How do I call Blat in case I want to call all txt files in a directory, and have them all attached to one mail (Not in Body!)?
Use VBscript with the FSO (File System Object).
* example code snippets *
set fso = CreateObject("Scripting.FileSystemObject")
blatcall = "blat.exe " ' and all the other fixed elements on the command line
set verzeichnis = fso.getfolder ("mein ordner")
set dateiliste =verzeichnis.files
for each datei in dateiliste
if "TXT" = UCase (fso.GetExtensionName (datei.Path)) then
blatcall = blatcall & " -attacht " & datei.name
end if
next
* end VBscript code snippets *
or use in a BAT file "dir /B *.txt >textattach.txt" and then reference this file with the -atf command line option
which has the problem that according to the doc which I consulted, the filenames should be in a comma-separated list in that file, whereas the DIR command puts each file name in a line by itself, without commas.
--
Mit freundlichen Grüßen
Lüko Willms
mailto:[email protected]