Home > Archive > Cobol > April 2005 > Re: Windows/Macro Language Info?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Windows/Macro Language Info?
|
|
| epc8@juno.com 2005-03-31, 3:55 am |
|
Lueko Willms wrote:
> . On 30.03.05
> wrote docdwarf@panix.com
> on /COMP/LANG/COBOL
> in d2eaim$r9b$1@panix5.panix.com
> about [OT] Windows/Macro Language Info?
>
>
> d> ... and I was wondering if anyone could tell me what language this
is
> d> supposed to be emulating - looks kinda sorta familiar, almost -
and
> d> where I might be able to find a reference-manual for it.
>
> I would say: this is the Autohotkey-Macro-Language.
>
> I would use a real script language, like REXX (IBM's Object REXX
> for Win has just been released as Freeware: http://www.oorexx.org) or
> Windows Scripting in either JScript or VBScript flavors. Others may
> prefer Perl.
>
I do this on a small scale each w using a desktop shortcut to a
(DOS) batch file which invokes a command line archiving utility such as
pkzip or work alikes. One problem with some of these is that (like
pkzip) they handle long file names on Win 9x but not NT/XP.
See http://unxutils.sourceforge.net/ for *nix flavored solutions like
zip, gzip or bzip2. Also there was a command line version with
different commands from the DOS version of pkzip 2.50. I think it is
now "out of print" but was called pk250c32.exe which handled long file
names on NT.
| |
| docdwarf@panix.com 2005-03-31, 3:56 am |
| In article <1112229926.139869.22050@g14g2000cwa.googlegroups.com>,
<epc8@juno.com> wrote:
[snip]
>See http://unxutils.sourceforge.net/ for *nix flavored solutions like
>zip, gzip or bzip2. Also there was a command line version with
>different commands from the DOS version of pkzip 2.50. I think it is
>now "out of print" but was called pk250c32.exe which handled long file
>names on NT.
Hmmmmm... a possibility. Only difficulty with that is I like to name each
running backup for the MM-DD on which it was made and store it on the CD
drive in the MM-YY directory appropriate for it; doing that in a DOS batch
file might be a bit... challenging.
Thanks much!
DD
| |
| Lueko Willms 2005-03-31, 8:55 am |
| .. Am 30.03.05
schrieb epc8@juno.com
bei /COMP/LANG/COBOL
in 1112229926.139869.22050@g14g2000cwa.googlegroups.com
ueber Re: Windows/Macro Language Info?
e> See http://unxutils.sourceforge.net/ for *nix flavored solutions like
e> zip, gzip or bzip2. Also there was a command line version with
e> different commands from the DOS version of pkzip 2.50. I think it is
e> now "out of print" but was called pk250c32.exe which handled long file
e> names on NT.
As for ZIPping files, my favorite is still the very free and open
source Info-Zip at http://www.info-zip.org
Ported to many platforms from Amiga to mainframes and, of course,
Windows.
Thanks for the pointer to the Unix-Utils.
Yours,
Lüko Willms http://www.mlwerke.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
"Die Interessen der Nation lassen sich nicht anders formulieren als unter
dem Gesichtspunkt der herrschenden Klasse oder der Klasse, die die
Herrschaft anstrebt." - Leo Trotzki (27. Januar 1932)
| |
| Lueko Willms 2005-03-31, 8:55 am |
| .. On 30.03.05
wrote docdwarf@panix.com
on /COMP/LANG/COBOL
in d2flri$anl$1@panix5.panix.com
about Re: Windows/Macro Language Info?
d> Hmmmmm... a possibility. Only difficulty with that is I like to name
d> each running backup for the MM-DD on which it was made and store it on
d> the CD drive in the MM-YY directory appropriate for it; doing that in
d> a DOS batch file might be a bit... challenging.
That's why I repeat: get beyond the DOS batch file, and move into
real scripting.
In case you used REXX on the IMB mainframe, get the free Object
REXX for Windows, otherwise have a look at Windows Scripting at
http://msdn.microsoft.com/scripting
Yours,
Lüko Willms http://www.willms-edv.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
Ein Buch ist ein Spiegel, wenn ein Affe hineinsieht, so kann kein Apostel herausgucken. -G.C.Lichtenberg
| |
| docdwarf@panix.com 2005-03-31, 3:55 pm |
| In article <bfceb$424b7b59$45491f85$11785@KNOLOGY.NET>,
LX-i <lxi0007@netscape.net> wrote:
>docdwarf@panix.com wrote:
>
>Figure out how to make this freeware pass the MM-DD to the batch file -
>somewhere along the lines of
>
>mybackup.cmd MM-DD
>
>Then you can use MM-DD by the alias %1, so you can do
>
>wzzip -ex -r %1.zip C:\ThisDir C:\ThatDir C:\etc
>
>I don't have an *exact* example here, but I can e-mail one home from
>work if you're interested.
Hmmmm... I'd be interested in seeing it, sure. Seems a bit on the wonky
side, freeware macro --> .bat file --> winzip but... hey, I'm the one
doing the Prod implementation review on this.
Thanks much!
DD
| |
| docdwarf@panix.com 2005-03-31, 3:55 pm |
| In article <fjL2e.858720$6l.291203@pd7tw2no>,
James J. Gavan <jgavandeletethis@shaw.ca> wrote:
>docdwarf@panix.com wrote:
>The only problem I would foresee on that is remembering the syntax for
>creating batch routines - very vague but you need a prompt in your batch
>file to enter your own specified filename.
Can't tell you what I had for supper yesterday... but I recall the syntax
is:
batfil arg1 arg2 arg3...
.... and in the .bat file one refers to %1, %2, %3 etc.
Thanks much!
DD
| |
| docdwarf@panix.com 2005-03-31, 3:55 pm |
| In article <1112253708.744487.137380@o13g2000cwo.googlegroups.com>,
Richard <riplin@Azonic.co.nz> wrote:
>
>I have a C program that creates a .BAT file containing the lines:
>SET DAY=30
>SET MONTH=03
>SET YEAR=05
>where the numbers come from the current date. This is then CALLed (.
>executed in Linux) to set the environment. Of course it could do this
>directly.
>
>These can then be used as on:
>mkdir $MONTH$YEAR
>cd $MONTH$YEAR
>pkzip -Rp BACK$MONTH$DAY ....
Another possibility... thanks much!
DD
| |
| docdwarf@panix.com 2005-03-31, 3:55 pm |
| In article <9TtuEbluflB@jpberlin-l.willms.jpberlin.de>,
Lueko Willms <l.willms@jpberlin.de> wrote:
>. On 30.03.05
> wrote docdwarf@panix.com
> on /COMP/LANG/COBOL
> in d2flri$anl$1@panix5.panix.com
> about Re: Windows/Macro Language Info?
>
>
>d> Hmmmmm... a possibility. Only difficulty with that is I like to name
>d> each running backup for the MM-DD on which it was made and store it on
>d> the CD drive in the MM-YY directory appropriate for it; doing that in
>d> a DOS batch file might be a bit... challenging.
>
> That's why I repeat: get beyond the DOS batch file, and move into
>real scripting.
I agree with 'get beyond the DOS batch file'... but what constitutes
'real' is something that might be discussed with Mr Wagner.
>
> In case you used REXX on the IMB mainframe, get the free Object
>REXX for Windows, otherwise have a look at Windows Scripting at
> http://msdn.microsoft.com/scripting
Never REXX'd, myself, but I'll give WinScript a look... meanwhile I'm
continue to diddle about with the macro program, seems like the keystroke
recorder works better on the WinXP box than on Win98.
Thanks much!
DD
| |
| Michael Wojcik 2005-03-31, 3:55 pm |
|
In article <d2flri$anl$1@panix5.panix.com>, docdwarf@panix.com writes:
> In article <1112229926.139869.22050@g14g2000cwa.googlegroups.com>,
> <epc8@juno.com> wrote:
>
> [snip]
>
>
> Hmmmmm... a possibility. Only difficulty with that is I like to name each
> running backup for the MM-DD on which it was made and store it on the CD
> drive in the MM-YY directory appropriate for it; doing that in a DOS batch
> file might be a bit... challenging.
Not if you have Command Extensions enabled, which I believe is the
default for XP. In any case, it's easy enough to have your shortcut
or scheduled task or whatever run the batch or command file with
"cmd /e:on" to enable them.
With command extensions, the dynamic environment variable "date" will
expand to the current date, in the current locale's format. I have
my locale set to ISO-format dates (via the "Regional and Language
Options" control panel), so for me that's eg "2005-03-31", but if you
have a different format it still shouldn't be hard to edit out the
information you want.
So for your scheme, I'd just use:
set zipfile=%date:~5%.zip
which means "set the environment variable zipfile to the string
representing the current date, skipping the first five characters,
and append '.zip' to it".
If I were using the (dumb) standard-US-format date, eg "03/31/2005",
I'd just use:
set zipfile=%date:~0,2%-%date:~3,2%.zip
which sets it to "first two characters of the current date, a hyphen,
and fourth and fifth characters of the current date, plus '.zip'".
(The characters in this form of variable expansion are indexed
starting from zero, and "~3,2" means starting at character index 3,
for two characters.)
For the directory, either:
set zipdir=x:/%date:~0,4%
for ISO-format dates, or
set zipdir=x:/%date:~-4%
for US-format ones (the "~-4" means "take the last four characters").
(Substitute your actual CD drive letter for "x:".)
Then the full path for the zip file would be %zipdir%/%zipfile%.
Now, if I were actually doing this, I'd just create a single variable
containing the fully-qualified pathname, but creating two may be
clearer for the sake of illustration.
By the way, while I prefer Info-Zip (which someone else mentioned),
it does not have an option to include only files with the archive bit
set. I believe WinZip with the Command Line Add-On does. One option
with Info-Zip would be to use xcopy to create a temporary tree with
only the changed files, and then zip from there, but that's rather
inelegant. Another would be to have zip take its list of files from
a piped dir listing only files with the archive bit set:
dir \ /s /b /a:a | zip -@ %zipdir%/%zipfile%
(Disclaimer: I haven't tested that.)
Note that this would make each incremental backup independent - to
do a full restore you'd restore the most recent full backup, then
the most recent incremental. Neither dir nor zip reset the archive
bit, so each incremental would include all the files changed since
the last full backup.
--
Michael Wojcik michael.wojcik@microfocus.com
An intense imaginative activity accompanied by a psychological and moral
passivity is bound eventually to result in a curbing of the growth to
maturity and in consequent artistic repetitiveness and stultification.
-- D. S. Savage
| |
| docdwarf@panix.com 2005-03-31, 3:55 pm |
| In article <d2hca80ffj@news2.newsguy.com>,
Michael Wojcik <mwojcik@newsguy.com> wrote:
>
>In article <d2flri$anl$1@panix5.panix.com>, docdwarf@panix.com writes:
[snip]
[color=darkred]
>So for your scheme, I'd just use:
>
> set zipfile=%date:~5%.zip
>
>which means "set the environment variable zipfile to the string
>representing the current date, skipping the first five characters,
>and append '.zip' to it".
>
>If I were using the (dumb) standard-US-format date, eg "03/31/2005",
>I'd just use:
>
> set zipfile=%date:~0,2%-%date:~3,2%.zip
[snip]
>For the directory, either:
>
> set zipdir=x:/%date:~0,4%
>
>for ISO-format dates, or
>
> set zipdir=x:/%date:~-4%
>
[snip]
>Note that this would make each incremental backup independent - to
>do a full restore you'd restore the most recent full backup, then
>the most recent incremental. Neither dir nor zip reset the archive
>bit, so each incremental would include all the files changed since
>the last full backup.
Solid stuff there, to be tossed into the mix and allowed to steep... ut
WinZip has an option to allow to reset the archive bit and I find that
handy.
Thanks much!
DD
| |
| Lueko Willms 2005-03-31, 8:55 pm |
| .. On 31.03.05
wrote mwojcik@newsguy.com (Michael Wojcik)
on /COMP/LANG/COBOL
in d2hca80ffj@news2.newsguy.com
about Re: Windows/Macro Language Info?
MW> By the way, while I prefer Info-Zip (which someone else mentioned),
MW> it does not have an option to include only files with the archive bit
MW> set. I believe WinZip with the Command Line Add-On does. One option
MW> with Info-Zip would be to use xcopy to create a temporary tree with
MW> only the changed files, and then zip from there, but that's rather
MW> inelegant. Another would be to have zip take its list of files from
MW> a piped dir listing only files with the archive bit set:
MW>
MW> dir \ /s /b /a:a | zip -@ %zipdir%/%zipfile%
That does work, but it does not reset the archive bit, though, but
this could be done after that using the "attrib" command.
I am working on a VBScript backup script, which actually does use
the -@ option to read the file list from Standard Input, but then also
uses the -u option, i.e. only those files, which have been changed
compared to the file in the archive, are to be compressed again. Teh
script is to cycle thru a set of daily, w ly, and monthly backups,
actually replacing the previous edition of that.
Monday thru Friday the daily backups, Saturday the w ly ones, and
each last Sunday in the month the monthly backups. I'm thinking about
quarterly backups, too.
The list of files to be backed up is to be taken from an INI-file.
Yours,
Lüko Willms http://www.willms-edv.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
Mit dem Band das ihre Herzen binden sollte haben sie ihren Frieden stranguliert. -G.C.Lichtenberg
| |
|
|
| docdwarf@panix.com 2005-04-06, 11:59 am |
| In article <d2lu6p$5t2$1@lust.ihug.co.nz>, djreid <djreid@ihug.co.nz> wrote:
>below is a batch fel that works with Windows 2000 or xp.
Thanks much... more to diddle with!
DD
|
|
|
|
|