Archive for the ‘File’ Category

How to open the windows explorer programmatically in .net


How to open the windows explorer using vb.net

  1. System.Diagnostics.Process.Start("explorer.exe", "c:\tmp")

, , ,

No Comments


How to rename a file
  1. function MoveFile()
  2.    dim OrigFilename as string = "myfile.pdf"
  3.  
  4.    Dim fi As New FileInfo(OrigFilename)
  5.    
  6.    fi.MoveTo("myNewFile.pdf")
  7.  
  8. end function

, , ,

No Comments


How to Get File Size

Public Class Tester
Public Shared Sub Main

Dim fileDetail As IO.FileInfo

fileDetail = My.Computer.FileSystem.GetFileInfo(“test.txt”)

Console.WriteLine(“Size: ” & fileDetail.Length & ” byte(s)”)
End Sub

End Class

, ,

No Comments



SetPageWidth