bonsoir, je voudrais télécharger lien par lien dans richtextbox mais il m’afficher une erreur.
mon code pour telecharger avec webclient :
message erreur : System.ArgumentException*: 'Caractères non conformes dans le chemin d'accès.'
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 Private Sub DownloaderMultipleFiles(names As String, destination As String) Dim lines As String() = Me.TextURL.Text.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries) For Each URL As String In lines Using client As New WebClient() ProgressBar1.Value = 0 client.Headers.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0") AddHandler client.DownloadProgressChanged, AddressOf Wc_DownloadProgressChanged AddHandler client.DownloadFileCompleted, AddressOf Wc_DownloadFileCompleted Dim uri As New Uri(URL) Dim ext As String = Path.GetExtension(uri.LocalPath) <= erreurs client.DownloadDataAsync(uri, Path.Combine(destination, names & ext)) End Using Next SetStatus("Vous avez fini de télécharger tous les fichiers.", Color.Blue) End Sub
avez-vous une solution pour télécharger lien par lien dans richtextbox1? merci d'avance
Partager