I have a workflow that creates a CSV file at the end. I would like to know how I can add the current year to the end of the report name so it is called E-BOOK INDEX 2017.csv and doesn't need to be hard coded.
The workflow is creating a Year token:
Here's the "Write csv file to network drive "script. I know nothing about scripting. What do I need to do to add the year token when naming the file?
namespace WorkflowActivity.Scripting.Writecsvfiletonetworkdrive
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class Script1 : RAScriptClass92
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
// overwriting existing file with same name
System.IO.File.Copy(GetTokenValue("csvpath").ToString(), @"\\adom\tn\Groups\Engineering\E-documents\LF Test System E-BOOK INDEX YEAR.csv", true);
}
}
}