Using Folder Data Source and need to refer to text in filename
We are creating a map for a client that integrates data from csv files into GP journal entries. We are using the file data source as they may process several days worth of files at one time. Each file has the file’s date in the filename but not in a field in the file and this cannot be changed. I need to get the date using the filename. I have read that using the folder data source means that you cannot get the filename before the document is processed. Is this true? If it is, then my only other option is to open and read each csv file in a script task before the map is run and append the date from the filename as a new column in the csv file. It’s dangerous to manipulate the data in the file but if this is my only option, I will do it. I have done the read and write processes using filesystemobject but am not sure how to instantiate filesystemobject in the vbscript for SmartConnect. I know that System.IO is available but am not sure what script to use to read and write data to each row using System.IO. Does anyone have suggestions for how I can accomplish this task?