I want to add a button to a secure site that will run a bat file to
perform numerous archiving functions.
You haven't told us what OS or web server you're using, but I'm
guessing Windows and IIS.
Find an online ref, probably an oldish one, and look up the use of
"CGI gateways" (web stuff, not graphics). This is likely to lead you
to where you more or less need to get to.
It's not a great technique. bat files are horribly crude. Even Unix
shell scripts are somewhat limited and Windows' incarnation of them as
bats is just pathetic. You can "do" stuff, but it's hard to "control"
things if they don't work as you'd planned. Writing commercial-grade
scripts needs you to be able to tell when something has gone wrong,
stop doing the rest of the process (don't over-write last week's
backup when today's has failed) and then to report back what happened.
Then can the whole idea of web-triggered backups and use "cron" or the
Windows "at" service. Why have to manually trigger regular jobs? Get
your computer to do it for you.
The button can only be accessed by me so there are no huge security
risks.
A dangerous irrelevance. That's _NOT_ the way to think about this.
Now if only you have network access, that's OK.
If this button only works if someone has already validated their
access, that's OK.
If you think that only one person "having access to" the button is OK,
that's wrong (I can easily make my own button that submits the same
URL).
If you think that only one person "knowing about the button" is OK,
that's wrong. (I saw your button traffic in the router / server logs).
What HTML code do I need to run the file remotely on the web server
when I click the button.
Very simple <form> with a button on it: any HTML forms tutorial should
tell you the rest.
Make sure the form uses <form method="POST" ... > rather than a GET.
For why, look up "RESTful" architectures - but (in brief) you don't
want "actions" to happen on a server in response to things triggered
by a simple GET. This is why you shouldn't (you could easily do it,
but it would be a bad idea) use a <a> link and a URL to trigger your
backup but should stick with a <form>