One liner shell command to find and rename to lowercase all SHP, DBF, and SHX file extensions
One liner shell command to find and rename to lowercase all SHP, DBF, and SHX file extensions starting from current directory:
Useful when you get your shapefiles over from Windows and mapserver won't cooperate.
EXTENSIONS="SHP SHX DBF" for E in $EXTENSIONS ; do export E; export e=`echo $E | tr '[:upper:]' '[:lower:]'`; for f in `find . -name "*.$E"` ; do mv $f `echo $f | sed "s/$E/$e/"`; done ; done
Useful when you get your shapefiles over from Windows and mapserver won't cooperate.