This is General Function, That You can Use
using System.IO
Public Sub CopyDir(ByVal strSrc As String, ByVal strDest As String)
Dim dirInfo As New DirectoryInfo(strSrc)
Dim fsInfo As FileSystemInfo
If Not Directory.Exists(strDest) Then
Directory.CreateDirectory(strDest)
End If
For Each fsInfo In dirInfo.GetFileSystemInfos
Dim strDestFileName As String = Path.Combine(strDest, fsInfo.Name)
If TypeOf fsInfo Is FileInfo Then
File.Copy(fsInfo.FullName, strDestFileName, True)
'This will overwrite files that already exist
Else
CopyDir(fsInfo.FullName, strDestFileName)
End If
Next
End Sub
skip to main |
skip to sidebar
RSS Feeds
Abhijit's World of .NET Blog
Tuesday, October 23, 2007
Labels
- .NET (1)
- .NET 4.0 (10)
- ASP.Net (2)
- ASP.NET (12)
- asp.net 4.0 (2)
- ASP.NET 4.0 (1)
- Awards (2)
- C# (8)
- C# 4.0 (3)
- code (1)
- codeproject (5)
- Debugging (2)
- Enterprise Library 4.1 (1)
- General (21)
- IIS (1)
- IntelliTrace (2)
- Microsoft ASP.NET Web Site (4)
- MSDN (1)
- Multithreaded Debugging (1)
- MVC (1)
- MVC Framework (1)
- MVP (3)
- My Articles (15)
- Parallel Debugging (1)
- RenderingMode (1)
- SQL Server 2005 (6)
- VideoTutorial (1)
- View State (1)
- Visual Studio 2010 (9)
- VS 2010 (1)
- VSX (1)
- Web Services (1)
- WPF (1)
ASP.NET Books
Copyright 2009
Abhijit's Blog. Powered by Blogger
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5
2 comments:
Clear and Best...
Great to see this.
Post a Comment