btamulis 9/30/2026 8:26:22 AM

Smart Connect Question - modify existing script

Okay - I have a Smart Connect21 Map that we currently manually run and it works beautifully.

I need to add a pre-integration task that will download a network file based upon the first 6 characters of the file.

We have an AI bot that will post a file that consistently starts with RAMPCC and then a date/time stamp. 

I need my task to download the file. 

I need the first line to find the file starting with RAMPCC and download regardless of time stamp. I tried * (like I do in powershell) but it doesn't work. 

Here's the script - 

Dim sourceFile As String = "\\99999\bbbb\RampCC ManualPayments Source\RampCC*.csv"

Dim destFile As String = "\\99999\GPShare\SC_Import\AccountsPayable\Ramp\Ramp CC Payments\Source\"

Dim mapInterface As Integer = 1
'---------------------------------------------------------------------------------------

Try
    'Move the file
    IO.File.Move(sourceFile, destFile)
Catch ex As Exception
    'If an error occurred , alert the user and return false to abort the map
If (mapInterface = 1) Then
    MessageBox.Show("An error occured while attempting to move the file: " & ex.Message, "File Error")
End If
    Return False
End Try

Return True

 

 

Version: All
Section: Dynamics GP, SmartConnect


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3