Useful Tips and Tricks for Quick Reference

Fix windows CRLF to LF using dos2unix on an entire directory

1
find . -type f -print0 | xargs -0 dos2unix

How to zip your GBA games

Directory recursion, individual per file zips, and will delete the .gba file after it’s zipped

1
for /R %d in (*.gba) do 7z -sdel a "%~pd%~nd.zip" "%d"

Directory recursion, one large zip (GBA.zip), and will delete the .gba file after it’s zipped

1
for /R %d in (*.gba) do 7z -sdel a "GBA.zip" "%d"

Remove -sdel from either line if you do not want to delete the source .gba files