
Hi Team,
do we have any reference code to move file from one folder to another folder in SharePoint?
with below code i am able to check the file exists or not but there is no method to move the file.
System.UriBuilder builder = new System.UriBuilder(integrationSource.SharepointUrl);
var host = builder.Host;
ISharePointProxy proxy = SharePointHelper::createProxy(host, integrationSource.SharepointSite, externalId);
Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider storageProvider =
new Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider(proxy,TestIntegrationDefinition.SharepointFolder);
boolean fileExists;
fileExists = storageProvider.FileExists("Test.xlsx");
if(fileExists)
info("OK");
Regards,
Vijay Yelmame
Hi Vijay, You might already know, it can be done easily in tools like Power Automate or Logic Apps, as per my experience mostly customers using it these days. I could not find any article or code to move the file to another SharePoint folder using C#.
Probably, someone will provide the code but consider those tools as well.