| | |
how to copy all files from one folder to another using system.io
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2008
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
hi
I am working in asp.net,vb.net
I have to copy all files from 1 folder to another folder through coding using system.io
the files in the new folder should remain with the same name
how to do this.
Here is VB code
asp.net Syntax (Toggle Plain Text)
imports System.io Public Shared Sub CopyFlashScriptFile(ByVal SourceDirectory As String, ByVal DestinationDirectory As String) Try Dim f() As String = Directory.GetFiles(SourceDirectory) For i As Integer = 0 To UBound(f) File.Copy(f(i), DestinationDirectory & "\" & fileNameWithoutThePath(f(i))) Next Catch ex As Exception End Try End Sub
Last edited by peter_budo; Dec 29th, 2008 at 11:20 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- How to copy files from Compaq V3000 recovery partition? (Troubleshooting Dead Machines)
- Rogue system tray icons and pop-ups. (Viruses, Spyware and other Nasties)
- Help System under attack (Viruses, Spyware and other Nasties)
- Listing files in a folder (C++)
- Saving Files during a complete system reboot (Windows NT / 2000 / XP)
- No files association with ANY file (Windows NT / 2000 / XP)
- startpage.4.ao browser hijacker / would like it out my system (Viruses, Spyware and other Nasties)
- Takes time to copy,cut,paste or delete (Windows 95 / 98 / Me)
Other Threads in the ASP.NET Forum
- Previous Thread: A Modern calendar control
- Next Thread: Create a permanent cookie
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox child class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdownmenu dynamic edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form forms gridview gudi homeedition hosting iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects order problem ratings redirect registration relationaldatabases rotatepage search security select serializesmo.table sessionvariables silverlight smartcard sql ssl tracking treeview typeof validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webarchitecture webdevelopment wizard xml xsl





