以未知格式下载vb文件或损坏?救命 [英] Download file in vb either in unknown format or damaged ? help

查看:102
本文介绍了以未知格式下载vb文件或损坏?救命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

我在vb中制作程序从互联网下载zip文件



但问题是在下载完成后无法打开任何文件错误

c:\ download \ call.zip

存档格式未知或已损坏




这是代码



Hi
I made program in vb to download zip file form the internet

but the problem is after the download completed can't open any file Error
c:\download\call.zip
The archive is either in unknown format or damaged


this is the code

Imports System.Net
Public Class Form1
    Private WithEvents httpclient As WebClient
 
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Button1.Enabled = False
        httpclient = New WebClient
        AddHandler httpclient.DownloadFileCompleted, AddressOf Downloaded
        httpclient.DownloadFileAsync(New Uri("https://www.download source.com/call.zip"), ("C:\download\call.zip"))
    End Sub
 
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        persent.Text = ""
    End Sub
 
    Private Sub dpc(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles httpclient.DownloadProgressChanged
        persent.Text = e.ProgressPercentage
    End Sub
 
    Private Sub Downloaded()
        If System.IO.File.Exists("C:\download\call.zip") = True Then
            Process.Start("C:\download\call.zip")
        Else
            MsgBox("Doesn't exist", 64, "Open")
        End If
    End Sub
End Class





任何人都可以帮助谢谢。



can anyone help thanks.

推荐答案

第一个要做的事情是使用浏览器手动尝试:文件看起来是否相同,是否大小相同?等等。



如果是,请按照此处所示尝试打开它。如果它仍然失败,则可能是文件格式存在问题:几年前WinZip引入了一种压缩格式,许多系统还没有赶上,这可能是你的特定存档的问题。



如果新下载的文件工作正常,那么你需要查看手动下载和自动下载版本之间的差异。
The first thing to do is try it manually, using a browser: does the file look the same, is it the same size? and so forth.

If it is, then try opening it as you have shown here. If it still fails, it may be the file format that is a problem: WinZip introduced a compression format a couple of years ago that a lot of systems have yet to catch up to yet and it may be that is your problem with that specific archive.

If the newly downloaded file works fine, then you need to look at the differences between the manually downloaded and the auto downloaded versions.


感谢它现在正在运行问题是dropbox.com我认为不允许直接下载链接所以我尝试了mediafire.com它正在工作。
Thanks it's working now the problem is dropbox.com I think doesn't allow direct download link so I try mediafire.com It's working.


这篇关于以未知格式下载vb文件或损坏?救命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆