Moving Files

lothos12345

Well-known member
Joined
May 2, 2002
Messages
294
Location
Texas
Can anyone give me an example of how I could move all the files in one directory to another directory in VB.NET? Any help with this question would be greatly appreiciated.
 
Rough and ready but should give you the idea
Code:
         Dim files() As String
         files = System.IO.Directory.GetFiles("c:\")
         For Each file As String In files
             System.IO.File.Move(file, "d:\" & file.Substring(3, file.Length - 3))
         Next
 
Back
Top