Page 1 of 1
Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 11:49
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.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 12:44
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.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 15:03
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.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 15:14
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.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 15:43
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
Paul.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 15:53
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
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.
Re: Per-directory templates/dropped messages settings
Posted: 16 Feb 2009 15:55
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