Writing a SmartConnect script to move and rename a source file.

Published: Dec 08, 2011
Post Author Written by Kevin Jones

How to write a Map After Success script to move and rename a text file used as a data source

Create a Map After Success script. This script moves the file from 1 directory into another and also appends the current date to it. You will need to modify the pathnames and source file name.
Dim dateTimeInfo as DateTime = DateTime.Now
Dim dateString as String = dateTimeInfo.ToString("MMddyy")
Dim sourcefile as string = "C:SmartConnectSample FilesFixed_Asset_General.csv"
Dim destfile as string = "C:SmartConnectSample FilesArchiveFixed_Asset_General" + dateString + ".csv"
return true

Feeling stuck? Get the support and guidance you need to help you power through any data challenge

We're on your integration team. Connect with our people and let us know how we can help you.