Last active
May 19, 2022 22:27
-
-
Save guillaC/77fe2b8136aeeda3c93c8fa29b07709c to your computer and use it in GitHub Desktop.
cavites downloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET NB=1 | |
:loop | |
IF %NB% GTR 95 GOTO concat | |
SET URL=https://www.georisques.gouv.fr/webappReport/ws/cavites/departements/%nb%/fiches.csv | |
SET FILE="./%NB%.csv" | |
ECHO Downloading from %URL% .. | |
powershell.exe -c "(New-Object Net.WebClient).DownloadFile('%URL%','%FILE%')" | |
SET /a NB=NB+1 | |
GOTO loop | |
:concat | |
echo Concatenate files .. | |
type *.csv > concat.csv | |
:end | |
ECHO end. | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment