I'm using TheBat and a SendFile.cmd and a SendFile.tpl
to automatically extract an email address from a file name
and send the file to the addressee.
The email address and file name are seperated by ~~
The SendFile.tpl is as follows;
%SetPattRegExp='C:\\Output\\(.*?)~~(.*?)\.txt'%-
%RegExpBlindMatch='%To'%-
%ModifyOnce(To)%-
%SetHeader(To,%SubPatt='1')%-
%SetHeader('X-Files','%SubPatt="2"')%-
%Subject="File"
Hi %ABToFirstName="%ToFName",
Your file /%SubPatt='2'/ is here.
Thank you.
Th files are in C:\Output, they are sent and then I use this Sorting Office
function to keep the file from sending over and over:
Copy C:\Output\%ToAddr~~%Header('X-Files').txt C:\Folder
Del C:\Output\%ToAddr~~%Header('X-Files').txt
And it all works sucessfully, except when the file name has a gap. For
example: my life.txt vs. my_life.txt.
When the file has a gap, it doesn't get removed from C:\Output. And
therefore resends over and over.
Can you help me remedy this? Can a _ be automatically be put into any file
name gap, or some other suggestion/remedy?
Thanks
--
________________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html