Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
WebDAV .NET for Exchange
>
Tutorial
> Move item or folder
The following example shows you how to move item or folder.
C# example
using System; using System.Net; using Independentsoft.Webdav.Exchange; namespace Sample { class Program { static void Main(string[] args) { NetworkCredential credential = new NetworkCredential("username", "password"); WebdavSession session = new WebdavSession(credential); Resource resource = new Resource(session); resource.Move("https://myserver/exchange/emailaddress/Inbox/message1.eml", "https://myserver/exchange/emailaddress/Backup/message1.eml", false, true); } } }
VB example
Imports System Imports System.Net Imports Independentsoft.Webdav.Exchange Module Module1 Sub Main(ByVal args() As String) Dim credential As NetworkCredential = New NetworkCredential("username", "password") Dim session As WebdavSession = New WebdavSession(credential) Dim resource As Resource = New Resource(session) resource.Move("https://myserver/exchange/emailaddress/Inbox/message1.eml", "https://myserver/exchange/emailaddress/Backup/message1.eml", False, True) End Sub End Module