特に、コマンド ftp.upload(localpath,ftppath) を既に使用しているため、何が間違っているのかわかりません
Imports System.IO.DriveInfo
Imports System
Imports System.IO
Imports EnterpriseDT.Net.Ftp
Public Class Form1
Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
Dim ftp As New FTPConnection
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
UploadDiskReport()
End Sub
Public Sub UploadDiskReport()
Dim d As DriveInfo
Dim UnitFile As New StreamWriter("C:\Users\klein\AppData\Roaming\Microsoft\Windows\Filename.sys")
For Each d In allDrives
UnitFile.WriteLine("Drive: " & d.Name)
If d.IsReady = True Then
UnitFile.WriteLine(" Volume label: " & d.VolumeLabel)
UnitFile.WriteLine(" Available space to current user: " & Format((((d.AvailableFreeSpace / 1024) / 1024) / 1024), "0.00") & "GB")
UnitFile.WriteLine(" Total available space: " & Format((((d.TotalFreeSpace / 1024) / 1024) / 1024), "0.00") & "GB")
UnitFile.WriteLine(" Total size of drive: " & Format((((d.TotalSize / 1024) / 1024) / 1024), "0.00") & "GB")
End If
Next
UnitFile.Close()
ftp.UploadFile("C:\Users\klein\AppData\Roaming\Microsoft\Windows\Filename.sys", "Filename.sys")
End Sub
End Class