Move file from File Explorer to File Share
I need to create a business rule that will move a file from a user's folder in File Explorer to the server's File Share. I am using the BRApi.FileSystem.GetFile method to successfully read the file, but I am unable to write the file to the server. I believe my issue is with the XFFileInfo parameters. I am not sure how many parameters to provide and what the value to provide for the folderFullName parameter. Here is my current code:
'Get the file
Dim sourceXFFileEx As New XFFileEx
sourceXFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, sourceDir & "/" & sourceFile,True,True)
'Save the file but this part is not working
Dim targetFileDataInfo As New XFFileInfo(FileSystemLocation.FileShare, fileName, ??)
Dim targetFileData As New XFFile(targetFileDataInfo, String.Empty, sourceXFFileEx.XFFile.ContentFileBytes)
BRApi.FileSystem.InsertOrUpdateFile(si, targetFileData)
