devxlogo

September 29, 2003

SetFileLength – Set the length in bytes of the input file

‘ Set the length in bytes of the input file’ Example:’ Dim filePath As String = “c: est.txt”‘ MessageBox.Show(“Original length: ” & New System.IO.FileInfo(filePath)’ .Length)’ SetFileLength(filePath, 50000)’ MessageBox.Show(“New length: “

GetDriveLabel – Retrieving the label of the specified drive

‘ Retrieve the drive name (label) of the specified drive’ Note: requires a reference to the System.Management assembly’ Example: MessageBox.Show(GetDriveLabel(“D”c))Function GetDriveLabel(ByVal driveLetter As Char) As String Dim driveFilter As String