IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Scripts/Batch Discussion :

Télécharger plusieurs fichiers depuis une URL [Batch]


Sujet :

Scripts/Batch

  1. #1
    Candidat au Club
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Mars 2015
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Mars 2015
    Messages : 3
    Points : 4
    Points
    4
    Par défaut Télécharger plusieurs fichiers depuis une URL
    Bonjour à tous,

    J'ai trouvé le script de hackoofr très intéressant : [Batch /Vbscript] Téléchargeur de fichier
    J'aimerai le modifier pour qu'il télécharge plusieurs fichiers mais je n'ai pas réussi.

    Je souhaiterai qu'une boite de dialogue s'ouvre avec un champ ou je positionnerai mon URL dans laquelle se trouve mes fichiers, exemple : http://www.test/documents/.
    Puis dans une deuxième boite de dialogue je saisirai ma liste de fichiers que je souhaite télécharger sans limite de quantité (fichier1, fichier2, fichier3, fichier4...)

    Pourriez-vous m'aider ?


    Merci d'avance.

  2. #2
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Pourquoi ne pas stoker les URL(s) des fichiers à télécharger dans un fichier texte comme dans cet exemple :
    URL.txt
    Code BAT : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    @echo off
    Title Telechargement d^'une liste d^'URL dans un document .txt by Hackoo
    mode con cols=80 lines=10 & Color A
    Set Fichier=URL.txt
    Set Source=%~dp0
    Set DownloadFolder=MyDownloadFolder
    Set Destination=%Source%%DownloadFolder%
    if not exist %DownloadFolder% MD %DownloadFolder%
    for /F "delims=" %%i in (%Fichier%) do (echo Downloading "%%i" & call:download "%%i" "%Destination%\%%~ni%%~xi")
    exit /b
     
    :download
    (echo src = "%~1"
    echo Set v1 = CreateObject("MSXML2.XMLHTTP"^)
    echo Set FSO = Createobject("Scripting.FileSystemObject"^)
    echo v1.open "GET", src, false
    echo v1.send
    echo If v1.Status = 200 Then
    echo Wscript.Echo "Download-Status: " ^& v1.Status ^& " " ^& v1.statusText
    echo Set v2 = CreateObject("ADODB.Stream"^)
    echo v2.open
    echo v2.Type = 1
    echo v2.Write v1.ResponseBody
    echo If FSO.Fileexists("%~2"^) Then FSO.DeleteFile("%~2"^)
    echo v2.Position = 0
    echo v2.SaveToFile "%~2"
    echo Wscript.Echo "Download-Status: " ^& v1.Status ^& vbTab ^& v1.statusText ^& vbCrlf ^& "%~2",Vbinformation,"OK Telecharge avec sucees !"
    echo End If
    echo v2.Close
    echo Set v1 = Nothing) >"%~dpn0.vbs"
    cscript.exe //nologo "%~dpn0.vbs"
    del "%~dpn0.vbs" >nul

  3. #3
    Candidat au Club
    Homme Profil pro
    Consultant informatique
    Inscrit en
    Mars 2015
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Mars 2015
    Messages : 3
    Points : 4
    Points
    4
    Par défaut
    Oui c'est parfait !!!

    Si je souhaite que pour une liste de fichier un dossier soit créé :
    URL.txt
    J'ai modifier ton script, est-ce que c'est bon pour toi ?
    Code BAT :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    @echo off
    Title Telechargement d^'une liste d^'URL dans un document .txt by Hackoo
    mode con cols=80 lines=10 & Color A
    Set Fichier=URL.txt
    Set Source=%~dp0
    Set DownloadFolder=MyDownloadFolder
    Set Destination=%Source%%DownloadFolder%
    if not exist %DownloadFolder% MD %DownloadFolder%
    for /F tokens=2 "delims= " %%i in (%Fichier%) do  MD %%b (echo Downloading "%%i" & call:download "%%i" "%Destination%\%%~ni%%~xi")
    exit /b

  4. #4
    Membre à l'essai
    Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Décembre 2010
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Biens de consommation

    Informations forums :
    Inscription : Décembre 2010
    Messages : 26
    Points : 19
    Points
    19
    Par défaut En tâche planifiée ?
    Bonjour,

    J'ai besoin d'utiliser ce script qui fonctionne très bien en tâche planifiée mais je n'arrive pas à le faire fonctionner.
    Apparemment c'est la fonction FSO.DeleteFile qui pose problème pour l'avoir testée dans un script simplifié.
    J'ai essayé le "true" à la fin pour forcer l’écrasement des fichiers en lecture seule mais ça ne fait rien >> https://msdn.microsoft.com/fr-fr/vba...etefile-method
    J'ai tenté aussi la fonction del classique et même soucis, ça marche mais pas en tâche planifiée...

    Avez vous une idée de comment le faire fonctionner en tâche planifiée ?

    Merci.

  5. #5
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut
    Citation Envoyé par klef63 Voir le message
    Bonjour,

    J'ai besoin d'utiliser ce script qui fonctionne très bien en tâche planifiée mais je n'arrive pas à le faire fonctionner.
    Apparemment c'est la fonction FSO.DeleteFile qui pose problème pour l'avoir testée dans un script simplifié.
    J'ai essayé le "true" à la fin pour forcer l’écrasement des fichiers en lecture seule mais ça ne fait rien >> https://msdn.microsoft.com/fr-fr/vba...etefile-method
    J'ai tenté aussi la fonction del classique et même soucis, ça marche mais pas en tâche planifiée...

    Avez vous une idée de comment le faire fonctionner en tâche planifiée ?

    Merci.
    La tâche planifié que tu veux la créer avec quelle fréquence d'exécution càd chaque semaine ou chaque mois ou bien chaque jour ou bien chaque heure etc ...

  6. #6
    Membre à l'essai
    Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Décembre 2010
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Biens de consommation

    Informations forums :
    Inscription : Décembre 2010
    Messages : 26
    Points : 19
    Points
    19
    Par défaut
    Citation Envoyé par hackoofr Voir le message
    La tâche planifié que tu veux la créer avec quelle fréquence d'exécution càd chaque semaine ou chaque mois ou bien chaque jour ou bien chaque heure etc ...
    Ce n'est pas la fréquence ni la planification du script en lui même qui me pose problème mais bien la suppression ou l'écrasement des fichiers à télécharger.
    Dès que je supprime du script la fonction fso.DeleteFile ça marche très bien en planification.

    J'ai vu que c'est cette erreur qui s'affiche :
    ADODB.stream : Impossible d'écrire dans le fichier

  7. #7
    Membre à l'essai
    Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Décembre 2010
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Biens de consommation

    Informations forums :
    Inscription : Décembre 2010
    Messages : 26
    Points : 19
    Points
    19
    Par défaut
    J'ai trouvé grâce à ce topic qui m'a mis sur la voie, plus d'une journée de prise de tête...
    https://www.developpez.net/forums/d1...cateur-taches/

    Au lieu de lancer le script en tâche planifiée, on lance l'interpréteur de commande cmd.exe avec des options :
    Arguments : Le script
    Commencer dans : Le chemin vers le script

    Et comme ça tout fonctionne parfaitement, merci encore pour ce script
    Images attachées Images attachées  

  8. #8
    Futur Membre du Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2018
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 2
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    Désolé klef63 de couper ta discussion mais j'ai un petit souci avec les script de hackoofr.
    J'utilise ton petit script qui est une merveille de simplicité depuis quelques semaines.
    Mais voilà avant pour télécharger une image çà prenait moins d'une seconde alors que depuis quelques jours il me faut bien 15 à 20 secondes par images !
    Depuis aujourd'hui cette fonction ne marche plus et donne le message :
    .\ImporterPhotos.vbs(5, 1) msxml3.dll : échec du téléchargement de la ressource spécifiée.
    En fouillant sur le net j'ai trouvé deux autres méthodes qui permet aussi de faire cela :
    CreateObject("MSXML2.ServerXMLHTTP"^)
    et
    CreateObject("WinHttp.WinHttpRequest.5.1"^)
    J'ai juste remplacé par l'une et puis l'autre des deux méthodes et çà refonctionne mais par contre c'est toujours aussi lent.
    Pour vous là quelle des trois méthodes devrait être la plus rapide normalement ? et pourquoi devenus si lent ?
    Vous avez une petite idée de ce qui pourrais provoquer cela ?
    Je n'ai rien fait de particulier au niveau installation sur mon pc, je suis sous windows7...

    Bien à vous,
    Jean-Yves

  9. #9
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Voici une mise à jour de ce script avec une barre d'attente en HTA , je l'ai testé avec ce fichier texte URLS.txt
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    https://download.toolslib.net/download/file/1/1578
    https://downloads.malwarebytes.com/file/mb3/
    http://frk.gamib.net/x/tomJER/tomJER.swf
    http://frk.gamib.net/x/madarrow/madarrow.swf
    http://frk.gamib.net/x/papaspizzeria/papaspizzeria.swf
    http://frk.gamib.net/x/rockyrider/rockyrider.swf
    Multi-Downloader.vbs
    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    @echo off
    Title Download Multi-Files by Hackoo 2018
    Color 9E & Mode 70,3
    echo(
    echo        Please wait ... Downloading the file is in progress ...
    Set "Downloader=%Temp%\Hackoo_Downloader.vbs"
    Set "File=%~dp0URLS.txt"
    If Not Exist "%File%" echo "%File%" does not exist & Timeout /T 5 /nobreak>nul & Exit
    @For /f "delims=" %%F in ('Type "%File%"') do ( Call :Download "%%F" )
    Exit
    ::*************************************************************************************
    :Download <url>
    (
    echo Option Explicit
    echo Const Copyright =" (C) by Hackoo 2018"
    echo Dim Title : Title = "Download Files"
    echo Const WHR_EnableRedirects = 6
    echo Dim Base_Link,Dynamic_Link,Flag,Question,DirectLink,Save2File
    echo Dim fso,ws,Temp,WaitingMsg,oExec
    echo Set fso = CreateObject^("Scripting.FileSystemObject"^)
    echo Set ws = CreateObject^("WScript.Shell"^)
    echo Temp = ws.ExpandEnvironmentStrings^("%%Temp%%"^)
    echo If WSH.Arguments.Count = 0 Then
    echo MsgBox "Usage in command line : "^& vbCrlf ^&_
    echo "Cscript //nologo "^& DblQuote^(WSH.Scriptname^) ^& " " ^& DblQuote^("URL"^),_
    echo vbExclamation,Title ^& Copyright
    echo Wscript.Quit^(1^)
    echo End If
    echo Base_Link = wscript.Arguments^(0^)
    echo If CheckDirectLink^(Base_Link^) = True Then 'Check if it is a direct link
    echo Save2File = GetFileNamefromDirectLink^(Base_Link^)
    echo If Save2File = "" Then
    echo MsgBox "An unknown error has occurred ! Quitting the script !",vbCritical,Title
    echo Wscript.Quit^(^)
    echo End If
    echo WaitingMsg = "Please wait ... The download of : <font color=Yellow>"^& DblQuote^(Save2File^) ^& "</font> is in progress ..."
    echo Call CreateProgressBar^(Title,WaitingMsg^)'Creation of Waiting Bar
    echo Call LaunchProgressBar^(^) 'Launch of the Waiting Bar
    echo Call Download^(Base_Link,Save2File^)
    echo pause^(3^)
    echo Call CloseProgressBar^(^)
    echo ws.Popup "The download of the file : "^& Save2File ^& vbCrlf ^& "is completed successfully ! ",3,Title,vbInformation
    echo 'MsgBox "The download of the file : "^& Save2File ^& vbCrlf ^&_
    echo '"is Completed !",vbInformation,Title
    echo wscript.Quit^(^)
    echo End If
    echo Call GetHeaderLocation^(Base_Link^)
    echo If Flag = True And CheckDirectLink^(GetHeaderLocation^(Base_Link^)^) = True Then 'Checking for a direct link of Malwarebytes
    echo Save2File = GetFileNamefromDirectLink^(GetHeaderLocation^(Base_Link^)^)
    echo If Save2File = "" Then
    echo MsgBox "An unknown error has occurred ! Quitting the script !",vbCritical,Title
    echo Wscript.Quit^(^)
    echo End If
    echo DirectLink = GetHeaderLocation^(Base_Link^)
    echo 'wscript.echo DirectLink ^& vbCrlf ^& Save2File
    echo 'Question = MsgBox^("Did you want to download this file ?" ^& vbCrlf ^&_
    echo 'Save2File,vbQuestion+vbYesNo,Title^)
    echo 'If Question = vbYes Then
    echo If Save2File ^<^> "" Then
    echo WaitingMsg = "Please wait ... The download of : <font color=Yellow>"^& DblQuote^(Save2File^) ^& "</font> is in progress ..."
    echo Call CreateProgressBar^(Title,WaitingMsg^)'Creation of Waiting Bar
    echo Call LaunchProgressBar^(^) 'Launch of the Waiting Bar
    echo Call Download^(DirectLink,Save2File^)
    echo Call CloseProgressBar^(^)
    echo ws.Popup "The download of the file : "^& Save2File ^& vbCrlf ^& "is completed successfully ! ",3,Title,vbInformation
    echo 'MsgBox "The download of the file : "^& Save2File ^& vbCrlf ^&_
    echo '"is Completed !",vbInformation,Title
    echo Wscript.Quit^(^)
    echo End If
    echo 'End If
    echo ElseIf Instr^(Base_Link,"toolslib"^) ^<^> 0 And Flag = True Then 'for Adwcleaner
    echo Dynamic_Link = Extract_Dynamic_Link^(GetDataFromURL^(Base_Link,"Get", ""^)^)
    echo Save2File = GetFileName^(GetHeaderLocation^(Dynamic_Link^)^)
    echo If Save2File = "" Then
    echo MsgBox "An unknown error has occurred ! Quitting the script !",vbCritical,Title
    echo Wscript.Quit^(^)
    echo End If
    echo 'Question = MsgBox^("The Dynamic Link is = "^& Dynamic_Link ^& vbcrlf ^& vbcrlf ^&_
    echo '"Response of The Dynamic Link is : "^& vbcrlf ^& GetHeaderLocation^(Dynamic_Link^) ^& vbCrlf ^& vbCrlf ^&_
    echo '"Extracted FileName is = " ^& Save2File,vbYesNo+vbQuestion,Title^)
    echo 'If Question = vbYes Then
    echo WaitingMsg = "Please wait ... The download of : <font color=Yellow>"^& DblQuote^(Save2File^) ^& "</font> is in progress ..."
    echo Call CreateProgressBar^(Title,WaitingMsg^)'Creation of Waiting Bar
    echo Call LaunchProgressBar^(^) 'Launch of the Waiting Bar
    echo Call Download^(Dynamic_Link,Save2File^)
    echo Call CloseProgressBar^(^)
    echo ws.Popup "The download of the file : "^& Save2File ^& vbCrlf ^& "is completed successfully ! ",3,Title,vbInformation
    echo 'wscript.echo "The download of the file : "^& Save2File ^& " is Completed !"
    echo 'MsgBox "The download of the file : "^& Save2File ^& vbCrlf ^&_
    echo '"is Completed !",vbInformation,Title
    echo 'Else
    echo Wscript.Quit^(^)
    echo 'End If
    echo ElseIf Instr^(Base_Link,"php"^) ^> 0 And Flag = False Then
    echo Save2File = GetFileName^(GetHeaderLocation^(Base_Link^)^) ' for site of autoitscript.fr
    echo If Save2File = "" Then
    echo MsgBox "An unknown error has occurred ! Quitting the script !",vbCritical,Title
    echo Wscript.Quit^(^)
    echo End If
    echo 'Question = MsgBox^("Did you want to download this file ?" ^& vbCrlf ^&_
    echo 'Save2File,vbQuestion+vbYesNo,Title^)
    echo 'If Question = vbYes Then
    echo WaitingMsg = "Please wait ... The download of : <font color=Yellow>"^& DblQuote^(Save2File^) ^& "</font> is in progress ..."
    echo Call CreateProgressBar^(Title,WaitingMsg^)'Creation of Waiting Bar
    echo Call LaunchProgressBar^(^) 'Launch of the Waiting Bar
    echo Call Download^(Base_Link,Save2File^)
    echo pause^(3^)
    echo Call CloseProgressBar^(^)
    echo MsgBox "The download of the file : "^& Save2File ^& vbCrlf ^&_
    echo "is Completed !",vbInformation,Title
    echo 'Else
    echo ' Wscript.Quit^(^)
    echo 'End If
    echo End If
    echo '------------------------------------------------
    echo Function GetHeaderLocation^(URL^)
    echo On Error Resume Next
    echo Dim h,GetLocation
    echo Set h = CreateObject^("WinHttp.WinHttpRequest.5.1"^)
    echo h.Option^(WHR_EnableRedirects^) = False
    echo h.Open "HEAD", URL , False
    echo h.Send^(^)
    echo GetLocation = h.GetResponseHeader^("Location"^)
    echo If Err = 0 Then
    echo Flag = True
    echo GetHeaderLocation = GetLocation
    echo Else
    echo Flag = False
    echo GetHeaderLocation = h.GetResponseHeader^("Content-Disposition"^)
    echo End If
    echo End Function
    echo '---------------------------------------------
    echo Function GetFileName^(Data^)
    echo Dim regEx, Match, Matches,FileName
    echo Set regEx = New RegExp
    echo regEx.Pattern = "\x27{2}(\w.*)"
    echo regEx.IgnoreCase = True
    echo regEx.Global = True
    echo If regEx.Test^(Data^) Then
    echo Set Matches = regEx.Execute^(Data^)
    echo For Each Match in Matches
    echo FileName = Match.subMatches^(0^)
    echo Next
    echo Else
    echo Set regEx = New RegExp
    echo regEx.Pattern = "\x22(\w.*)\x22"
    echo regEx.IgnoreCase = True
    echo regEx.Global = True
    echo Set Matches = regEx.Execute^(Data^)
    echo For Each Match in Matches
    echo FileName = Match.subMatches^(0^)
    echo Next
    echo End If
    echo GetFileName = FileName
    echo End Function
    echo '---------------------------------------------
    echo Function Extract_Dynamic_Link^(Data^)
    echo Dim regEx, Match, Matches,Dynamic_Link
    echo Set regEx = New RegExp
    echo regEx.Pattern = Base_Link ^& "\?s=[^""]*"
    echo regEx.IgnoreCase = True
    echo regEx.Global = True
    echo Set Matches = regEx.Execute^(Data^)
    echo For Each Match in Matches
    echo Dynamic_Link = Match.Value
    echo Next
    echo Extract_Dynamic_Link = Dynamic_Link
    echo End Function
    echo '------------------------------------------------
    echo Function GetDataFromURL^(strURL, strMethod, strPostData^)
    echo Dim lngTimeout
    echo Dim strUserAgentString
    echo Dim intSslErrorIgnoreFlags
    echo Dim blnEnableRedirects
    echo Dim blnEnableHttpsToHttpRedirects
    echo Dim strHostOverride
    echo Dim strLogin
    echo Dim strPassword
    echo Dim strResponseText
    echo Dim objWinHttp
    echo lngTimeout = 59000
    echo strUserAgentString = "http_requester/0.1"
    echo intSslErrorIgnoreFlags = 13056 ' 13056: ignore all err, 0: accept no err
    echo blnEnableRedirects = True
    echo blnEnableHttpsToHttpRedirects = True
    echo strHostOverride = ""
    echo strLogin = ""
    echo strPassword = ""
    echo Set objWinHttp = CreateObject^("WinHttp.WinHttpRequest.5.1"^)
    echo objWinHttp.SetTimeouts lngTimeout, lngTimeout, lngTimeout, lngTimeout
    echo objWinHttp.Open strMethod, strURL
    echo If strMethod = "POST" Then
    echo objWinHttp.setRequestHeader "Content-type", _
    echo "application/x-www-form-urlencoded"
    echo End If
    echo If strHostOverride ^<^> "" Then
    echo objWinHttp.SetRequestHeader "Host", strHostOverride
    echo End If
    echo objWinHttp.Option^(0^) = strUserAgentString
    echo objWinHttp.Option^(4^) = intSslErrorIgnoreFlags
    echo objWinHttp.Option^(6^) = blnEnableRedirects
    echo objWinHttp.Option^(12^) = blnEnableHttpsToHttpRedirects
    echo If ^(strLogin ^<^> ""^) And ^(strPassword ^<^> ""^) Then
    echo objWinHttp.SetCredentials strLogin, strPassword, 0
    echo End If
    echo On Error Resume Next
    echo objWinHttp.Send^(strPostData^)
    echo If Err.Number = 0 Then
    echo If objWinHttp.Status = "200" Then
    echo GetDataFromURL = objWinHttp.ResponseText
    echo Else
    echo GetDataFromURL = "HTTP " ^& objWinHttp.Status ^& " " ^& _
    echo objWinHttp.StatusText
    echo End If
    echo Else
    echo GetDataFromURL = "Error " ^& Err.Number ^& " " ^& Err.Source ^& " " ^& _
    echo Err.Description
    echo End If
    echo On Error GoTo 0
    echo Set objWinHttp = Nothing
    echo End Function
    echo '------------------------------------------------
    echo Sub Download^(URL,Save2File^)
    echo Dim File,Line,BS,ws
    echo On Error Resume Next
    echo Set File = CreateObject^("WinHttp.WinHttpRequest.5.1"^)
    echo File.Open "GET",URL, False
    echo File.Send^(^)
    echo If err.number ^<^> 0 then
    echo Line = Line ^& vbcrlf ^& "Error Getting File"
    echo Line = Line ^& vbcrlf ^& "Error " ^& err.number ^& "(0x" ^& hex^(err.number^) ^& ") " ^& vbcrlf ^&_
    echo err.description
    echo Line = Line ^& vbcrlf ^& "Source " ^& err.source
    echo MsgBox Line,vbCritical,"Error getting file"
    echo Err.clear
    echo wscript.quit
    echo End If
    echo If File.Status = 200 Then ' File exists and it is ready to be downloaded
    echo Set BS = CreateObject^("ADODB.Stream"^)
    echo Set ws = CreateObject^("wscript.Shell"^)
    echo BS.type = 1
    echo BS.open
    echo BS.Write File.ResponseBody
    echo BS.SaveToFile Save2File, 2
    echo ElseIf File.Status = 404 Then
    echo MsgBox "File Not found : " ^& File.Status,vbCritical,"Error File Not Found"
    echo Else
    echo MsgBox "Unknown Error : " ^& File.Status,vbCritical,"Error getting file"
    echo End If
    echo End Sub
    echo '------------------------------------------------
    echo Function GetFileNamefromDirectLink^(URL^)
    echo Dim ArrFile,FileName
    echo ArrFile = Split^(URL,"/"^)
    echo FileName = ArrFile^(UBound^(ArrFile^)^)
    echo GetFileNamefromDirectLink = FileName
    echo End Function
    echo '------------------------------------------------
    echo Function CheckDirectLink^(URL^)
    echo Dim regEx
    echo Set regEx = New RegExp
    echo regEx.Pattern = "(.exe|.zip|.rar|.msi|.vbs|.bat|.hta|.txt|.log|.doc" ^& _
    echo "|.docx|.xls|.xlsx|.pdf|.mp3|.mp4|.avi|.png|.jpg|.jpeg|.bmp|.gif|.swf)"
    echo regEx.IgnoreCase = True
    echo regEx.Global = False
    echo If regEx.Test^(URL^) Then
    echo CheckDirectLink = True
    echo End If
    echo End Function
    echo '------------------------------------------------
    echo '**********************************************************************************************
    echo Sub CreateProgressBar^(Title,WaitingMsg^)
    echo Dim ws,fso,f,f2,ts,ts2,Ligne,i,fread,LireTout,NbLigneTotal,Temp,PathOutPutHTML,fhta,oExec
    echo Set ws = CreateObject^("wscript.Shell"^)
    echo Set fso = CreateObject^("Scripting.FileSystemObject"^)
    echo Temp = WS.ExpandEnvironmentStrings^("%%Temp%%"^)
    echo PathOutPutHTML = Temp ^& "\Barre.hta"
    echo Set fhta = fso.OpenTextFile^(PathOutPutHTML,2,True^)
    echo fhta.WriteLine "<HTML>"
    echo fhta.WriteLine "<HEAD>"
    echo fhta.WriteLine "<Title> " ^& Title ^& Copyright ^& "</Title>"
    echo fhta.WriteLine "<HTA:APPLICATION"
    echo fhta.WriteLine "ICON = ""magnify.exe"" "
    echo fhta.WriteLine "BORDER=""THIN"" "
    echo fhta.WriteLine "INNERBORDER=""NO"" "
    echo fhta.WriteLine "MAXIMIZEBUTTON=""NO"" "
    echo fhta.WriteLine "MINIMIZEBUTTON=""NO"" "
    echo fhta.WriteLine "SCROLL=""NO"" "
    echo fhta.WriteLine "SYSMENU=""NO"" "
    echo fhta.WriteLine "SELECTION=""NO"" "
    echo fhta.WriteLine "SINGLEINSTANCE=""YES"">"
    echo fhta.WriteLine "</HEAD>"
    echo fhta.WriteLine "<BODY text=""white""><CENTER>"
    echo fhta.WriteLine "<marquee DIRECTION=""LEFT"" SCROLLAMOUNT=""3"" BEHAVIOR=ALTERNATE><font face=""Comic sans MS"">" ^& WaitingMsg ^&"</font></marquee>"
    echo fhta.WriteLine "<img src=""data:image/gif;base64,R0lGODlhgAAPAPIAAP////INPvvI0/q1xPVLb/INPgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAgAAPAAAD5wiyC/6sPRfFpPGqfKv2HTeB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ExgO37pd/pj9W6iwIbd6CdP9OmjtGzcNFsVhDHfxDELGjxw1Xpg4kheABAAh+QQJCgAAACwAAAAAgAAPAAAD/wi0C/6sPRfJpPGqfKv2HTeBowiZjqCqG9malYS5sXXScYnvcP6swJqux2MMjTeiEjlbyl5MAHAlTEarzasv+8RCu9uvjTuWTgXedFhdBLfLbGf5jF7b30e3PA+/739ncVp4VnqDf2R8ioBTgoaPfYSJhZGIYhN0BZqbBROcm56fnQ+iow6loZ+pnKugpKKtmrGmAAO2twOor6q7rL2up7C/ssO0usG8yL7KwLW4tscA0dPCzMTWxtXS2tTJ297P0Nzj3t3L3+fmzerX6M3hueTp8uv07ezZ5fa08Piz/8UAYhPo7t6+CfDcafDGbOG5hhcYKoz4cGIrh80cPAOQAAAh+QQJCgAAACwAAAAAgAAPAAAD5wi0C/6sPRfJpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgwFkJEFE5KRlJWTD5iZDpuXlZ+SoZaamKOQp5wAm56loK6isKSdprKotqqttK+7sb2zq6y8wcO6xL7HwMbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAA7AAAAAAAAAAAA"" />"
    echo fhta.WriteLine "</CENTER></BODY></HTML>"
    echo fhta.WriteLine "<SCRIPT LANGUAGE=""VBScript""> "
    echo fhta.WriteLine "Set ws = CreateObject(""wscript.Shell"")"
    echo fhta.WriteLine "Temp = WS.ExpandEnvironmentStrings(""%%Temp%%"")"
    echo fhta.WriteLine "Sub window_onload()"
    echo fhta.WriteLine " CenterWindow 575,100"
    echo fhta.WriteLine " Self.document.bgColor = ""DarkOrange"" "
    echo fhta.WriteLine " End Sub"
    echo fhta.WriteLine " Sub CenterWindow(x,y)"
    echo fhta.WriteLine " Dim iLeft,itop"
    echo fhta.WriteLine " window.resizeTo x,y"
    echo fhta.WriteLine " iLeft = window.screen.availWidth/2 - x/2"
    echo fhta.WriteLine " itop = window.screen.availHeight/2 - y/2"
    echo fhta.WriteLine " window.moveTo ileft,itop"
    echo fhta.WriteLine "End Sub"
    echo fhta.WriteLine "</script>"
    echo fhta.close
    echo End Sub
    echo '**********************************************************************************************
    echo Sub LaunchProgressBar^(^)
    echo Set oExec = Ws.Exec^("mshta.exe " ^& Temp ^& "\Barre.hta"^)
    echo End Sub
    echo '**********************************************************************************************
    echo Sub CloseProgressBar^(^)
    echo oExec.Terminate
    echo End Sub
    echo '**********************************************************************************************
    echo Function DblQuote^(Str^)
    echo DblQuote = Chr^(34^) ^& Str ^& Chr^(34^)
    echo End Function
    echo '**********************************************************************************************
    echo Sub Pause^(Secs^)
    echo Wscript.Sleep^(Secs * 1000^)
    echo End Sub
    echo '*********************************************************************************************
    )>"%Downloader%"
    Call "%Downloader%" "%~1"
    goto :eof
    ::*************************************************************************************

    Nom : 2018-06-13_02-02-03.gif
Affichages : 2248
Taille : 159,2 Ko

  10. #10
    Futur Membre du Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2018
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 2
    Points : 6
    Points
    6
    Par défaut
    Salut,

    Cà fonctionne bien
    Par contre toujours aussi lent...
    Je ne m'y connais pas assez mais est-ce que tu pourrais faire comme dans la première version et copier les fichiers dans un répertoire.
    Je suppose que le fait que j'utilise un fichier csv et lieu de txt ne change rien sur la rapidité !

    Bàt,
    Jean-Yves

  11. #11
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut
    Citation Envoyé par jeanyves1976 Voir le message
    Salut,
    Cà fonctionne bien
    Par contre toujours aussi lent...
    Je ne m'y connais pas assez mais est-ce que tu pourrais faire comme dans la première version et copier les fichiers dans un répertoire.
    Je suppose que le fait que j'utilise un fichier csv et lieu de txt ne change rien sur la rapidité !

    Bàt,
    Jean-Yves
    Si c'est possible de m'envoyer votre fichier.csv par pièce-jointe pour faire mes tests

  12. #12
    Futur Membre du Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2018
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 2
    Points : 6
    Points
    6
    Par défaut
    Bonjour,

    Voici le fichier que j'utilise.

    URL.txt

    J'ai juste changé l'extension de csv en txt, sinon fichier refusé pour l'importation ici...

    Jean-Yves

  13. #13
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 839
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 48
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut

    Vous pouvez tester ce nouveau script qui utilise Certutil pour télécharger les fichiers
    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    @echo off
    Mode 65,3 & Color A
    Title Download file with Certutil command by Hackoo 2018
    Set Fichier=URL.txt
    Set DownloadFolder=%~dp0MyDownloadFolder
    if not exist %DownloadFolder% MD %DownloadFolder%
    @for /F "delims=" %%i in ('Type "%Fichier%"') do (
        cls & echo( & echo       Downloading "%%i"
        Call :Download "%%i" "%DownloadFolder%\%%~nxi"
    )
    Start "" Explorer "%DownloadFolder%" & Exit
    ::--------------------------------------------
    :Download <Url> <File>
    certutil.exe -urlcache -split -f %1 %2
    exit /b
    ::-------------------------------------------

  14. #14
    Futur Membre du Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mai 2018
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : Belgique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Électronique et micro-électronique

    Informations forums :
    Inscription : Mai 2018
    Messages : 2
    Points : 6
    Points
    6
    Par défaut
    Bonsoir,

    Cà marche au top
    Merci à toi d'avoir pris le temps de chercher

    A+
    Jean-Yves

  15. #15
    Membre à l'essai
    Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Décembre 2010
    Messages
    26
    Détails du profil
    Informations personnelles :
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : Biens de consommation

    Informations forums :
    Inscription : Décembre 2010
    Messages : 26
    Points : 19
    Points
    19
    Par défaut
    Bonjour,

    Merci pour toutes ces versions de script, le dernier fonctionne très bien effectivement.
    J'essaye de modifier le fichier URL.txt contenant les fichiers à télécharger afin qu'il télécharge une liste de fichier portant presque le même nom.

    J'ai dans mon dossier distant par exemple ces fichiers :
    fichier_20190205.txt
    fichier_20190204.txt
    etc...

    Comment est-il possible de mettre dans le fichier URL.txt un chemin pour qu'il prenne en compte tous les fichiers qui commencent par fichier_*.txt

    J'ai testé :
    https://domain.com/test/fichier*.txt > Ca ne fonctionne pas
    J'ai essayé de mettre l'* autrement et retourné le truc dans tous les sens, j'ai pas trouvé l'info pour l'instant non plus en vbs vu que je n'y connais pas grand chose.

    Avez vous une idée ?

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [AJAX] Lire un fichier depuis une URL?
    Par PlaTyPuSs dans le forum AJAX
    Réponses: 6
    Dernier message: 01/06/2009, 13h28
  2. Télécharger des fichiers depuis une URL
    Par nicox33 dans le forum Macros et VBA Excel
    Réponses: 5
    Dernier message: 15/01/2008, 18h33
  3. Téléchargement d'un fichier depuis une URL
    Par Fly3R dans le forum Windows Forms
    Réponses: 22
    Dernier message: 08/07/2007, 19h33
  4. télécharger un fichier depuis un url
    Par demonia dans le forum Entrée/Sortie
    Réponses: 2
    Dernier message: 29/03/2006, 00h25
  5. Télécharger un fichier depuis une applet
    Par doudblast dans le forum Applets
    Réponses: 4
    Dernier message: 08/03/2006, 16h17

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo