Pages: 1
RSS
Grabbing files from a unicode-named folder and sending
 
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 in the file name. With the help 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"

The file I've named here, as an example, with XXX has to actually be named with unicode characters,  but TheBat! won't grab and send unless the folder has an english name. Is there a way to make this work? (besides renaming the folder to a non-unicode name).

thanks.
 
Did you try the latest version of TB?
Support for unicode has improved IIRC.
In case you're using 4.0.18 already you're out of luck
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Thanks for your reply.

Can you tell me what IIRC is please?

I have version 4.0.11 currently?

Is there a cost to upgrade to 4.0.18?

And upon upgrade will i have to recreate the scheduling & sorting office parameters?

thanks again
 
IIRC = If I Recall Correctly (that's an abbreviation you'll encounter rewagularly on forums)

There's no cost to switch from 4.0.11 to 4.0.18

Just install the new version on top of the old one (don't unistall anything) and all of your settings will be be kept.
__________________________________
I'm just a user of The Bat! I don't work for Ritlabs.
 
Thank you.

I will try the new version.
Pages: 1