Per-directory templates/dropped messages settings

Features wanted...
Post Reply
pmoore
Posts: 28
Joined: 27 May 2008 13:50

Per-directory templates/dropped messages settings

Post by pmoore »

I have a number of directories where I store emails. I do this simply by dragging and dropping them from my email program. Most of the time, just using the subject as the file name is correct, so I have my template set to <subject>.

But for certain directories, we have a different "standard" and I need to prepend the date. So in those directories, I use <date>_<subject>. I do this by manually changing the configuration, but this is obviously a bit of a nuisance.

It would be useful for me to have per-folder template settings (or some similar alternative, for example an "alternate" setting which is used when I drop a message whilke holding down the Windows key).

Hmm, alternatively, is it possible to get at email values like <subject> and <date> within a script? Then I could build my own script to rename the files after I drop them... That might be a more generally useful feature to add, if it's not already there.

Paul.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Per-directory templates/dropped messages settings

Post by admin »

I see your point, but I can't do much about it for now.

Maybe the best way to go would be to create a rename job (UDC / Rename RegExp...) that converts your filenames to the wished standard after dropping.

pmoore
Posts: 28
Joined: 27 May 2008 13:50

Re: Per-directory templates/dropped messages settings

Post by pmoore »

admin wrote:Maybe the best way to go would be to create a rename job (UDC / Rename RegExp...) that converts your filenames to the wished standard after dropping.
That's certainly possible (and may actually be better than something as specialized as per-directory templates) but I'd need to be able to get the email properties for the current item. The only way I can see of doing this at the moment would be to write a VBScript program that extracted the data from the file and put it in the clipboard, and then use a UDC/Script

Code: Select all

run ExtractEmail.vbs <curitem>; rename , <clipboard>_*
(or something like that). But it's pretty clumsy using an external command and the clipboard like that.

Paul.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Per-directory templates/dropped messages settings

Post by admin »

When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.

pmoore
Posts: 28
Joined: 27 May 2008 13:50

Re: Per-directory templates/dropped messages settings

Post by pmoore »

admin wrote:When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.
Ah, I see what you're getting at. My problem's slightly worse - for the default, I use a template of <subject> only, so I don't have the date available for those cases when I need it. And <subject> is far more common, so I can't really make <date>_<subject> the default and have a UDC to strip the date where I don't need it.

Oh, well, I'll see what I can do with VBScript and the joys of the CDO object model :wink:
Paul.

admin
Site Admin
Posts: 64886
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Per-directory templates/dropped messages settings

Post by admin »

pmoore wrote:
admin wrote:When your template generates <subject>_<date> files and you need <date>_<subject> files, then you'd simply need a RegExp rename that swaps the parts of the name. No need to grab the data again from the contents.
Ah, I see what you're getting at. My problem's slightly worse - for the default, I use a template of <subject> only, so I don't have the date available for those cases when I need it. And <subject> is far more common, so I can't really make <date>_<subject> the default and have a UDC to strip the date where I don't need it.

Oh, well, I'll see what I can do with VBScript and the joys of the CDO object model :wink:
Paul.
Note that the date is also found in the Modified Date of a dropped message. You can retrieve it for the current file using <datem ...> or using SC report(). Some scripting skills are needed here.

pmoore
Posts: 28
Joined: 27 May 2008 13:50

Re: Per-directory templates/dropped messages settings

Post by pmoore »

admin wrote:Note that the date is also found in the Modified Date of a dropped message. You can retrieve it for the current file using <datem ...> or using SC report(). Some scripting skills are needed here.
Ah! I hadn't noticed that. That will suit me fine! Thanks for saving me from VBScript :)
Paul

Post Reply