-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minecraft-onedrive] Add screenshots linker
- Loading branch information
1 parent
2f6e36f
commit c76fb4b
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |