Insert Date, Time, Created By, Modified by... etc file properties in m-file

Is it possible to insert the file proprties automatically in m-file (Ofcourse in commented form)

1 Comment

May be you can write the required data in a text file..and copy it in m file, every time you need it...?

Sign in to comment.

 Accepted Answer

I guess probably no. But usually you can use tokens in your file when you have your functions/programs under source control (like e.g. subversion).
Titus

4 Comments

Thanks for answer.
Please can you give me any example, how to use tokens.
%$Id:
%$Log:
Those are the only two tokens that we end up using in practice.
The times recorded for them are not the times the files were modified, but rather the times that the files were "checked in"
For subversion (or cvs) you have tags like $Id$, so you add some line
% $Id$
to your file and set the corresponding property for the file (subversion specific) and when you check in that file, $Id$ will be replaced by something like $Id: mycode.m 2012-01-02 Titus$. Other source control systems work similarly.
Titus
Right, sorry I should have used $ instead of : at the end of the token.

Sign in to comment.

More Answers (0)

Categories

Products

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!