asked on
Public Function CopyMediaDirectory(ByVal directorySource As String, ByVal directoryDestination As String) As String Implements IM05_PublishedOnlineCourseManager.CopyMediaDirectory
Dim source As New DirectoryInfo(Server.MapPath("../" & directorySource))
Dim destination As New DirectoryInfo(Server.MapPath("../" & directoryDestination))
If Not destination.Exists Then
destination.Create()
End If
' Copy all files.
Dim files As FileInfo() = source.GetFiles()
For Each file As FileInfo In files
file.CopyTo(Path.Combine(destination.FullName, file.Name))
Next
' Process subdirectories.
Dim dirs As DirectoryInfo() = source.GetDirectories()
For Each dir As DirectoryInfo In dirs
' Get destination directory.
Dim destinationDir As String = Path.Combine(destination.FullName, dir.Name)
' Call CopyDirectory() recursively.
CopyMediaDirectory(directorySource & "/" & dir.ToString(), destinationDir)
Next
Return "foldersComplete"
End Function
ASKER
Dim source As New DirectoryInfo(Server.MapPath("../" & directorySource))
Line 83: Dim destination As New DirectoryInfo(Server.MapPath("../" & directoryDestination))
ASKER
ASKER
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
TRUSTED BY
It would be better if you could look in to the server log and find out what is the actual error message for the internal error you received.
Regards.