Custom Script For Saving back up to Your Sims 2 Neighborhood Folder in Linux
After watching @teaaddictyt's youtube video on protecting and managing your save files. I thought I'd give my own tip to fellow linux users.
I created a script that will zip a copy of your last written neighborhood file and send it to a drive or backup folder of your choice. You can even bind it to a keyboard shortcut if you are that much of sim's addict. ;) edit: Sorry if my instructions were a little unclear... you only have to provide two entires under source and destination paths -- that's it. Also I won't be able to really help you troubleshoot this if it doesn't work. I had some assistance with chatgpt.
!/bin/bash
# Source and destination paths
SRC_DIR="/you/only/input/source/documents/ea games/sims 2/neighborhoods" DEST_DIR="/you/only/input/destination/here"
# Find the latest modified folder
LATEST_FOLDER=$(find "$SRC_DIR" -mindepth 1 -maxdepth 1 -type d -printf "%T@ %p\n" | sort -nr | head -n 1 | cut -d' ' -f2-)
# Check if a folder was found
if [ -z "$LATEST_FOLDER" ]; then echo "No folders found in $SRC_DIR" exit 1 fi
# Get the folder name
FOLDER_NAME=$(basename "$LATEST_FOLDER")
#Create a timestamped backup file
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S") ZIP_FILE="$DEST_DIR/${FOLDER_NAME}backup$TIMESTAMP.zip"
# Zip the folder
echo "Zipping $LATEST_FOLDER to $ZIP_FILE…" zip -r "$ZIP_FILE" "$LATEST_FOLDER"
echo "Backup completed: $ZIP_FILE"














