Created
April 1, 2026 18:13
-
-
Save richpsharp/55b7f8664a84f18352c0e47119b5af57 to your computer and use it in GitHub Desktop.
batch script to convert geotiff tiles to COGs
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 | |
| setlocal enabledelayedexpansion | |
| rem usage: script.bat 2000 2007 | |
| set START_YEAR=%1 | |
| set END_YEAR=%2 | |
| for /L %%Y in (%START_YEAR%,1,%END_YEAR%) do ( | |
| if not exist "%%Y" mkdir "%%Y" | |
| echo Copying year %%Y... | |
| gcloud storage cp --no-clobber gs://ecoshard-root/gee_export/nat_semi_grassland_p_%%Y* "%CD%\%%Y" | |
| ) | |
| endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment