[Users] Open Attachments

Brian Bates buzz at ksys.co.nz
Tue Sep 28 21:17:29 CEST 2021


On Mon, 27 Sep 2021 16:08:43 -0400
Chainsaw via Users <users at lists.claws-mail.org> wrote:

> Brian,
> 
> I actually have a few different ways, similar in concept and all
> limited, but I like the simplest way the best. I do not like the
> workflow, but it works well.
> 
> So, I assume Debian has a command prompt that will open files by
> association. In other words at the command prompt, if you type
> c:\path\mypdf.pdf, and hit Enter it will open the file in the
> associated pdf viewer (jpg, txt, png, etc.). (If not I can tell you
> how to work around that)
> 
> 1) Create an action equivalent to this:
> replacing ["c:\windows\system32\cmd.exe" /c] with Debian equivalent.
> 
> Menu name: OpenAttach
>   Command: "c:\windows\system32\cmd.exe" /c "%u" &
> 
> Note: I do not think this is documented.
>       "%u" (also "%s") acts like a switch.
>       If the argument has no spaces, there will be no surrounding
> quotes. If the argument has spaces, there will be surrounding quotes.
>       If you just use %u, the command will fail if there are spaces.
> 
> 2) Create the Compose Window button as shown in attachment.
> 
> 3) To open an attachment:
> a) add attachments as usual using ctrl-m or dragging into compose
> window. b) in Attachments tab double-click on an attachment.
> c) highlight full path in Path field (or CTRL-A), then CTRL-C, then
> Cancel. d) select OpenAttach button, CTRL-V, then Enter.
> Note: If you save to draft folder, close compose window and open
> draft, the attachment path is now in
> C:\...\Roaming\Claws-mail\mimetmp\, but still works.
> 
> Works fine in Windows.
> I did write a batch script that does error checking, opens the passed
> filename by targeting the program of my choice for each extension (no
> association required), and closes cmd.exe in the background. So if
> you can write scripts, you can really expand on this.
Thanks Chainsaw, I'll have a look, but queueing it as per Paul's
suggestion seems to be the simplest at this stage.

-- 
Cheers

Buzz


More information about the Users mailing list