<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000099" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Paul - thank you - I found some of
these useful.<br>
<br>
Another emailing program to consider -
<a class="moz-txt-link-freetext" href="http://caspian.dotconf.net/menu/Software/SendEmail/">http://caspian.dotconf.net/menu/Software/SendEmail/</a><br>
<br>
Found this in a few of my dos scripts - not sure of the source -
one line to grap date and time together:<br>
<br>
for /f "tokens=2-8 delims=/:. " %%A in ("%date%:%time: =0%") do
set "ymdt=%%C%%B%%A_%%D%%E"<br>
<br>
Regards,<br>
Andy.<br>
<br>
<br>
On 3/08/2017 6:56 PM, pwhite peercore wrote:<br>
</div>
<blockquote type="cite"
cite="mid:016e01d30c36$6479d670$2d6d8350$@com.au">
<pre wrap="">Hi Marty and all,
I think the list server has not distributed my post with the attachments.
If anyone wants them please feel free to contact me.
All my scripts are regular DOS command scripts not Powershell.
Yes you can use subroutines (messy) and call other scripts (easy).
See for example, I make a lot of use of yyyymmdd.bat which sets a bunch of
date stamp type variables.
You can access CMD window thus:
Server 2008 / Win7 and prior
        Start, run, "cmd" <enter>
Server 2012 / Win8 and after
        WindowsKey, "cmd" <enter>
Here is a resource I use to help me out.
<a class="moz-txt-link-freetext" href="https://ss64.com/index.html">https://ss64.com/index.html</a>
Click on CMD.
postie.exe here:
<a class="moz-txt-link-freetext" href="http://www.infradig.com/postie.html">http://www.infradig.com/postie.html</a>
alternative
<a class="moz-txt-link-freetext" href="https://github.com/muquit/mailsend">https://github.com/muquit/mailsend</a>
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:info-ingres-bounces@lists.planetingres.org">info-ingres-bounces@lists.planetingres.org</a>
[<a class="moz-txt-link-freetext" href="mailto:info-ingres-bounces@lists.planetingres.org">mailto:info-ingres-bounces@lists.planetingres.org</a>] On Behalf Of Martin
Bowes
Sent: Monday, 31 July 2017 8:31 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:paul.white@shift7solutions.com.au">paul.white@shift7solutions.com.au</a>; <a class="moz-txt-link-abbreviated" href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a>
Subject: Re: [Info-ingres] Windows Server and batch scripts
Hi Paul,
I've managed to look through those scripts...it looks like PowerShell
doesn't do subroutines and you've had to make them using goto statements. Is
that the case?
Also, is postie.exe a home brew effort?
Marty
-----Original Message-----
From: Paul White [<a class="moz-txt-link-freetext" href="mailto:paul.white@shift7solutions.com.au">mailto:paul.white@shift7solutions.com.au</a>]
Sent: 27 July 2017 11:06
To: <a class="moz-txt-link-abbreviated" href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a>
Subject: Re: [Info-ingres] Windows Server and batch scripts
"it's more powerful than cron"
and comes with some really annoying bugs.
I've attached some examples I've used and enhanced over the years.
Feel free to borrow or reuse - no warranty implied.
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:info-ingres-bounces@lists.planetingres.org">info-ingres-bounces@lists.planetingres.org</a>
[<a class="moz-txt-link-freetext" href="mailto:info-ingres-bounces@lists.planetingres.org">mailto:info-ingres-bounces@lists.planetingres.org</a>] On Behalf Of Roy Hann
Sent: Thursday, 27 July 2017 7:11 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:info-ingres@lists.planetingres.org">info-ingres@lists.planetingres.org</a>
Subject: Re: [Info-ingres] Windows Server and batch scripts
Martin Bowes wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Much to my horror I've had to install a server on a windows
box....Ugh, I feel unclean.
How do you automate batch scripts to do basic maintenance such as
backups, modifies and optimizes? If anyone has a sample script and
some pointers on what the cron equivalent is on Micropox then I'd be
very grateful to see them.
Martin Bowes
</pre>
</blockquote>
<pre wrap="">
As Michael Cressy pointed out, the Windows Task Scheduler is what you need.
As he also said, it's more powerful than cron.
What he didn't say is that it can be a royal pain to diagnose and debug when
something goes wrong. It's idea of success is doing its own job
successfully, not your script doing its job successfully. "The operation was
a complete success. Unfortunately the patient died."
Working across multiple platforms I would not counsel you to invest any time
in learning PowerShell. It is undoubtedly capable. It is vastly more capable
than the DOS scripting language. But the learning curve is steep and long
and you end up with a skill that is applicable only to Windows.
I have become a bit of a fan-boy for Python (Python 3.5 to be specific),
which I now use for all my platform-independent scripting.
_______________________________________________
Info-ingres mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a>
<a class="moz-txt-link-freetext" href="http://lists.planetingres.org/mailman/listinfo/info-ingres">http://lists.planetingres.org/mailman/listinfo/info-ingres</a>
_______________________________________________
Info-ingres mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a>
<a class="moz-txt-link-freetext" href="http://lists.planetingres.org/mailman/listinfo/info-ingres">http://lists.planetingres.org/mailman/listinfo/info-ingres</a>
_______________________________________________
Info-ingres mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Info-ingres@lists.planetingres.org">Info-ingres@lists.planetingres.org</a>
<a class="moz-txt-link-freetext" href="http://lists.planetingres.org/mailman/listinfo/info-ingres">http://lists.planetingres.org/mailman/listinfo/info-ingres</a>
</pre>
</blockquote>
<br>
</body>
</html>