Skip to content

Instantly share code, notes, and snippets.

@richpsharp
Created April 1, 2026 18:13
Show Gist options
  • Select an option

  • Save richpsharp/55b7f8664a84f18352c0e47119b5af57 to your computer and use it in GitHub Desktop.

Select an option

Save richpsharp/55b7f8664a84f18352c0e47119b5af57 to your computer and use it in GitHub Desktop.
batch script to convert geotiff tiles to COGs
@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