|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Rename all files in Directory
I need to rename 100's of map files.
The code I wrote seems to give correct out to screen but I can't get it to rename any files. Thanks in advance Imports System.IO Public Module BinaryReadWrite Public Sub Main() Dim File, Files() As FileInfo Dim oldname, newname As String ' Check all the Map files in Map directory. Dim Dir As New DirectoryInfo("e:\Maps") Files = Dir.GetFiles("*.map") ' Display the name of all the files. For Each File In Files oldname = File.Name newname = oldname.Remove(0, 11) Console.Write(newname) Console.WriteLine() 'FileCopy("e:\Maps\oldname", "e:\NewMaps\newname") Next Console.ReadLine() End Sub End Module |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Rename all files in Directory |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|