Computer Hope

Software => Computer software => Topic started by: Slothic on August 12, 2010, 03:13:07 PM

Title: Autoupdate through a batch file
Post by: Slothic on August 12, 2010, 03:13:07 PM
Okay, here is my problem, not sure if this is the correct section by the way.

I need a way to autoupdate a file through a batch script
I tried installing url2file but it didn't register its command in the shell.
This is my current script for Autorestarting the "server" whenever a crash happens.
Code: [Select]
@echo off
cls
echo Protecting Minecraft from crashes...
echo If you want to close server and this script, close the Server window and type Y depending on your language followed by Enter.
title Minecraft PRIVATE Watchdog
:server
echo (%time%) Server started.
start /wait java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
echo (%time%) WARNING: Server closed or crashed, restarting.
goto server

Somewhere in this, i'd like it to delete the minecraft_server.jar and redownload it from the webpage to get the updated version.
Title: Re: Autoupdate through a batch file
Post by: Slothic on August 12, 2010, 03:14:40 PM
By the way, i know that batch itself cannot download files. But maybe it could call on a program that could do it?
Title: Re: Autoupdate through a batch file
Post by: Slothic on August 17, 2010, 07:23:29 AM
Anyone got any suggestion at all?.