Is it possible to set the filename of a file template dynamically?

Is it possible to use macros or apply any logic to the filenames of files generated using file templates?

For example, in the attached screenshots, I'm using the file templates to generate migration classes (used with FluentMigrator).  These classes are usually named using the format _yyyyMMddHHmm_Description, and I'd like the filenames named the same way.  Currently, I have to rename the generated files after they are created.  The date string is generated from a macro, and I'd also like to use this value in the filename, but it looks like the filename is based entirely on the filename entered into the dialog box when generating the file, and no additional logic can be applied to it.  Ideally, I'd like to be able to use the macro in the filename too.



Attachment(s):
migration-3.png
migration-2.png
migration-1.png
1 comment
Comment actions Permalink

Unfortunately not. The filename can contain any of $NAME$, $FULLNAME$, $PROJECT$ or $RELPATH$, but it's not customisable.

The only alternative right now is to manually enter the date as the filename in the initial dialog box, and use that in your templates to generate classnames.


There is a YouTrack issue for this, that you can use to track and vote for: http://youtrack.jetbrains.com/issue/RSRP-355528
0

Please sign in to leave a comment.