This zips all files in a directory and renames the zip archive according to the name of the existing directory.
for i in */; do zip -r "${i%/}.zip" "$i"; done
This shell script assumes that you have already installed GDAL and are converting between .KMZ files and Shapefiles with the names preserved. The specific ogr2ogr
commands can be changed as needed.
This also assumes many .KMZ files in a single directory. Kudos to Marii Nyrop.
Begin by creating a file named batch-separate-folders.sh
with the following and place it in your directory with the KMZs:
for KMZ in *.kmz; do
IDENTIFIER="$(basename ${KMZ} .kmz)"
If you have a bunch of .jpg photos in a directory that were taken with a camera with coordinates associated, this workflow will allow you to recursively get the coordinates.
First, install exiftool
Then, from the directory where all of the .JPGs are
exiftool /Users/andrewbattista/desktop/*.JPG |grep 'File Name\|GPS Latitude\|GPS Longitude'
If you have a directory path with many JSON files in it and you want them all on a single document for batch edits use JS
find . -name '*.json' -exec cat '{}' + | jq -s '.' > /Users/staff/Desktop/newjsonsinglefile.json
To reduce the process time for exceedingly large examples, you may be able to simply use
find . -name '*.json' -exec jq -s '{}' + > /Users/staff/Desktop/newjsonsinglefile.json