From c76fb4b59e9f37df3600bafbf66078009e5f5860 Mon Sep 17 00:00:00 2001 From: Scott Martin Date: Fri, 5 Jan 2024 15:29:09 +0000 Subject: [PATCH] [minecraft-onedrive] Add screenshots linker --- minecraft-onedrive/ScreenshotsLinker.bat | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 minecraft-onedrive/ScreenshotsLinker.bat diff --git a/minecraft-onedrive/ScreenshotsLinker.bat b/minecraft-onedrive/ScreenshotsLinker.bat new file mode 100644 index 0000000..8981a0c --- /dev/null +++ b/minecraft-onedrive/ScreenshotsLinker.bat @@ -0,0 +1,40 @@ +@echo off + +rem TODO: Backup stuff + +set /p ScreenshotsOnedrivePath="Enter the path to the folder within your OneDrive folder where you'll keep your screenshots folder, not including the path to OneDrive itself (eg. Games\Minecraft): " + +if not defined ScreenshotsOnedrivePath ( + echo Please start again and enter something this time. + pause + exit +) + +set ScreenshotsFullPath=%userprofile%\OneDrive\%ScreenshotsOnedrivePath% + +rem TODO: Presumably we can test if it's a junction and that it points to +rem the right place, in which case we can exit as successful rather than unsure + +if exist "%appdata%\.minecraft\screenshots" ( + echo There's already a screenshots in %appdata%\.minecraft, please check. + pause + exit +) + +if not exist "%ScreenshotsFullPath%\screenshots" ( + echo There's no screenshots folder at %ScreenshotsFullPath%, please check. + pause + exit +) + +mklink /J "%appdata%\.minecraft\screenshots" "%ScreenshotsFullPath%\screenshots" + +chcp 65001 >nul + +echo ╔════════════════════════════════════════════════════════════════════════════╗ +echo ║ VERY IMPORTANT: ║ +echo ║ Go to where the folder of your screenshots is, right-click it, and choose ║ +echo ║ "Always keep on this device". It might get corrupted if you don't! ║ +echo ╚════════════════════════════════════════════════════════════════════════════╝ + +pause