Changing file name with File Template

With a file template, is it possible to change the file name?

I am trying to create a template for my migration files. I can get the template the way I need with the variables, but I would like to customize the name of the file generated.

For example, instead of the file name Test.cs, I would like it to be 20140330153423_Test.cs. Basically just appending a timestamp to the file.

My current template looks like:

namespace $NAMESPACE$ {     using FluentMigrator;            [Migration($NUMBER$)]      public class $NAME$ : Migration      {           public override void Up()           {                $END$           }                      public override void Down()           {           }      } }


Where the macros are:
Capture.PNG

2 comments
Comment actions Permalink

Hello,

I beleieve there's no such way to achieve that automatically. When inserting
the file template it is prompted to enter the filename, however there is
no possibility to automatically add a timestamp there AFAIK.

We apologize for the inconvenience.
Thank you.
________________________
Alex Berezoutsky,
Senior Support Engineer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

That is what I was afraid of.

I had created VS extension some time ago to do this and really did not want to do that again.

Thanks for the info.

Joe

0

Please sign in to leave a comment.