Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Windows/Macro Language Info?
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.


Report this thread to moderator Post Follow-up to this message
Old Post
epc8@juno.com
03-31-05 08:55 AM


Re: Windows/Macro Language Info?
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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:56 AM


Re: Windows/Macro Language Info?
..     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)

Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
03-31-05 01:55 PM


Re: Windows/Macro Language Info?
..    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 he
rausgucken. -G.C.Lichtenberg

Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
03-31-05 01:55 PM


Re: Windows/Macro Language Info?
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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:55 PM


Re: Windows/Macro Language Info?
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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:55 PM


Re: Windows/Macro Language Info?
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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:55 PM


Re: Windows/Macro Language Info?
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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:55 PM


Re: Windows/Macro Language Info?
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

Report this thread to moderator Post Follow-up to this message
Old Post
Michael Wojcik
03-31-05 08:55 PM


Re: Windows/Macro Language Info?
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]

>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


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
03-31-05 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Pages (2): [1] 2 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:56 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.