I have a Forms process that is passing an Excel file to Workflow (FortheUploadedExcelFile_CurrentFile). I also declare two tokens:
So, I'd like to take the uploaded file and save it to the excelFolderPath giving it the name that's in the token for excelFileName.
I tried use the following script to retrieve the file, and save it as excelFolderPath\excelFileName:
namespace WorkflowActivity.Scripting.WriteExcelFiletonetworkdrive { 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() { // save Excel file System.IO.File.Copy(GetTokenValue("FortheUploadedExcelFile_CurrentFile").ToString(), @"(GetTokenValue("excelFolderPath")" + "\" + "(GetTokenValue("excelFileName")", true); } } }
I get an error: "Newline in constant". Any ideas what I'm doing wrong?