Directory can realize copy, delete, move, create, and rename DirectoryInfo to achieve copy, delete, move, create, and rename the difference between the two classes: Directory's methods are static methods, if your operation is One-time, then you can consider using Directory, otherwise you can use DirectoryInfo. Note: (By default, all users will get all access rights to the new directory.) Below is the example: Imports SystemImports System.io
Public class directoryInfo1 public class limited = "g: / mydoc / msdn learning note / IO / tempdir1" DIM DESTNATION AS STRING = "g: / mydoc / msdn learning note / IO / tempdir2" if Directory. Exists (source) = false then directory.CreateDirectory (source) end if if Directory.Exists (destnation) then directory.delete (destnation) end if Directory.Move (source, destnation) File.CreateText (destnation "/ myfile.txt" ) End Sub End Class Note: The MOVE method can implement the rename function. Delete deleted directory is not placed in the recycle bin if you want to use the DirectoryInfo class, you must be a directoryInfo instance, use the directory name as a parameter, such as DIM DI As DirectoryInfo = New DirectoryInfo ("C: / Temp") Can refer to MSDN