Skip to content

Instantly share code, notes, and snippets.

@Himel-Sarkar
Forked from guillaC/updater.bat
Created May 16, 2021 04:32
Show Gist options
  • Save Himel-Sarkar/2f9c9ab00cc1f8af1c9f55f3a1bb2ed0 to your computer and use it in GitHub Desktop.
Save Himel-Sarkar/2f9c9ab00cc1f8af1c9f55f3a1bb2ed0 to your computer and use it in GitHub Desktop.
update uMod mod for the game Rust
@echo off
SET URL=https://umod.org/games/rust/download
SET FILE="./%RANDOM%.zip"
SET FOLDERPATH="C:\Users\Guillaume\Desktop\RustServer\common\rust_dedicated\data\Managed"
ECHO Downloading from %URL%
powershell.exe -c "(New-Object Net.WebClient).DownloadFile('%URL%','%FILE%')"
ECHO Done.
ECHO Extract to current folder
powershell.exe -c "Expand-Archive -Force '%FILE%' ./"
ECHO Done.
ECHO Copy to %FOLDERPATH%.
COPY .\RustDedicated_Data\Managed\* %FOLDERPATH% /Y
COPY .\RustDedicated_Data\Managed\x64\* %FOLDERPATH%\x64\ /Y
COPY .\RustDedicated_Data\Managed\x86\* %FOLDERPATH%\x86\ /Y
ECHO Done.
DEL %FILE%
RMDIR /S /Q .\RustDedicated_Data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment