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