Log in

View Full Version : Need Help with a Batch File


mitchsc
Jul 24, 2011, 01:41 PM
I just purchased a CanoScan LiDE 210. It has an email function that automatically launches your default email client and attaches the scanned document to the Compose window. This scanner only seems to allow this function to work with Outlook and Outlook Express. The manual says the email program must be MAPI compliant.

I use Thunderbird, and the scanner's email function does not work with this email client. I found a small utility called FileAttach that gets it working with my Win7 PC, but not XP. http://www.stephan-brenner.com/?page_id=312

Went on the Thunderbird Forum, and the Moderator suggested writing a small batch file for the XP machine. He gave me the following code, but I really don't understand it, and couldn't get very far trying to use it:

Set Thunderbird as the default email client and then create a batch file that calls Thunderbird with something like "C:\Program Files\Mozilla Thunderbird\Thunderbird" -compose attachment=%1 . Then use that batch file instead of FileAttach. %1 should get replaced by the filename.

I've read about batch files, but still don't understand what I am supposed to do here. No response from the Thunderbird Forum, so hoping someone here can help me. I really need this laid out in simple terms.

Thanks...

ScottGem
Jul 24, 2011, 02:19 PM
Open up Notepad, enter the code and save the file with a .bat extension to the root directory of your C drive.

mitchsc
Jul 24, 2011, 04:09 PM
Thank you SG.

Could you please clarify a couple of points on his instruction?

Set Thunderbird as the default email client and then create a batch file that calls Thunderbird with something like "C:\Program Files\Mozilla Thunderbird\Thunderbird" -compose attachment=%1 . Then use that batch file instead of FileAttach. %1 should get replaced by the filename.

1) Do I include the quotes?

2) His pathway ends in Thunderbird/Thunderbird. In the Programs Folder the 2nd Thunderbird is an .exe file. Should I include the .exe in this bat file on the 2nd Thunderbird?

3) He says to replace %1 with file name. Do I just make up any file name here?

4) He says to use the batch file instead of FileAttach.exe. The scanner program is looking for an .exe file. It won't see the .bat file. Am I misunderstanding something here.

If his logic is correct, and you wouldn't mind, could you possible type out exactly what the .bat file should be (with or without quotes)?

Thank you very much. This is a bit over my head...

ScottGem
Jul 24, 2011, 05:17 PM
1) No
2) Should't need to but won't hurt
3) No the file gets included when you rin the batch
4) I really don't know his intention.

mitchsc
Jul 24, 2011, 05:31 PM
Thank SG. I'll give it a shot...