Skip to content

Instantly share code, notes, and snippets.

@guillaC
Last active May 19, 2022 22:27
Show Gist options
  • Save guillaC/77fe2b8136aeeda3c93c8fa29b07709c to your computer and use it in GitHub Desktop.
Save guillaC/77fe2b8136aeeda3c93c8fa29b07709c to your computer and use it in GitHub Desktop.
cavites downloader
@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