need help getting yesterday

H

hedosean

OK this is going on win 2k Pro systems. I need to be able to run at
say 2am and have it save to "Yesterday's" folder. Folders are named
Monday, Tuesday,....,Sunday. So for example, at 2 am om Friday morning

I want it to save to the folder called Thursday because it is saving
Thursday's backup data. Now, I was able to locate an exe called
date2num and use it allong with julian to day conversions but the boss
wants everything self contained and only wants batchscript that will
run on win 2k pro. Im not so bright apparently because the brain is
turning into oatmeal on this.

Thanks


HedoSean.
 
B

billious

hedosean said:
OK this is going on win 2k Pro systems. I need to be able to run at
say 2am and have it save to "Yesterday's" folder. Folders are named
Monday, Tuesday,....,Sunday. So for example, at 2 am om Friday morning

I want it to save to the folder called Thursday because it is saving
Thursday's backup data. Now, I was able to locate an exe called
date2num and use it allong with julian to day conversions but the boss
wants everything self contained and only wants batchscript that will
run on win 2k pro. Im not so bright apparently because the brain is
turning into oatmeal on this.

Thanks


HedoSean.


Multipost
 
J

Jerold Schulman

OK this is going on win 2k Pro systems. I need to be able to run at
say 2am and have it save to "Yesterday's" folder. Folders are named
Monday, Tuesday,....,Sunday. So for example, at 2 am om Friday morning

I want it to save to the folder called Thursday because it is saving
Thursday's backup data. Now, I was able to locate an exe called
date2num and use it allong with julian to day conversions but the boss
wants everything self contained and only wants batchscript that will
run on win 2k pro. Im not so bright apparently because the brain is
turning into oatmeal on this.

Thanks


HedoSean.


See the following tips in the 'Tips & Tricks' at http://www.jsifaq.com

8293 » How can I return the date that is plus or minus n days from today?
10272 » Another way to return a 4 digit year, 2 digit month, and 2 digit day from a short date, regardless of your short date format.
7047 » How do I convert a date to the day number and day name?

call DatePorM -1 Yesterday
call Date2YMD %Yesterday% yyyy mm dd
call day %yyyy% %mm% %dd% daynumb daytext
@echo %daytext%

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
A

Alexander Suhovey

-----Original Message-----
From: hedosean [mailto:[email protected]]
Posted At: Monday, September 25, 2006 7:33 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: need help getting yesterday

OK this is going on win 2k Pro systems. I need to be able to run at
say 2am and have it save to "Yesterday's" folder. Folders are named
Monday, Tuesday,....,Sunday. So for example, at 2 am om Friday morning

I want it to save to the folder called Thursday because it is saving
Thursday's backup data. Now, I was able to locate an exe called
date2num and use it allong with julian to day conversions but the boss
wants everything self contained and only wants batchscript that will
run on win 2k pro. Im not so bright apparently because the brain is
turning into oatmeal on this.

Thanks


HedoSean.

Hedosean,

Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

What I settled on as most universal and accurate solution is VBScript
since it has date/time maths builtin and it is supported by
Win2k/XP/2003 out of the box.

If you stuck with batch scripts it's not a problem since you still can
use VBS snipplets as separate scripts or just generate and execute them
during runtime like this example below which assigns yesterday's day
name to 'YDAY' environment variable you can use later in your batch:

[1]@echo off
[2]setlocal
[3]set tvbs="%Temp%\_tmp.vbs"
[4]echo WScript.Echo WeekdayName(Now-1)>%tvbs%
[5]for /f "delims=" %%i in ('cscript /nologo %tmpvbs%') do set YDAY=%%i
[6]del /q %tmpvbs%
[7]echo Yesterday was %YDAY%
 
A

Alexander Suhovey

-----Original Message-----
From: Alexander Suhovey [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 2:30 AM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday
-----Original Message-----
From: hedosean [mailto:[email protected]]
Posted At: Monday, September 25, 2006 7:33 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: need help getting yesterday

OK this is going on win 2k Pro systems. I need to be able to run at
say 2am and have it save to "Yesterday's" folder. Folders are named
Monday, Tuesday,....,Sunday. So for example, at 2 am om Friday morning

I want it to save to the folder called Thursday because it is saving
Thursday's backup data. Now, I was able to locate an exe called
date2num and use it allong with julian to day conversions but the boss
wants everything self contained and only wants batchscript that will
run on win 2k pro. Im not so bright apparently because the brain is
turning into oatmeal on this.

Thanks


HedoSean.

Hedosean,

Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

What I settled on as most universal and accurate solution is VBScript
since it has date/time maths builtin and it is supported by
Win2k/XP/2003 out of the box.

If you stuck with batch scripts it's not a problem since you still can
use VBS snipplets as separate scripts or just generate and execute them
during runtime like this example below which assigns yesterday's day
name to 'YDAY' environment variable you can use later in your batch:

[1]@echo off
[2]setlocal
[3]set tvbs="%Temp%\_tmp.vbs"
[4]echo WScript.Echo WeekdayName(Now-1)>%tvbs%
[5]for /f "delims=" %%i in ('cscript /nologo %tmpvbs%') do set YDAY=%%i
[6]del /q %tmpvbs%
[7]echo Yesterday was %YDAY%

Sorry, posted wrong version.

[1]@echo off
[2]setlocal
[3]set tvbs="%Temp%\_tmp.vbs"
[4]echo WScript.Echo WeekdayName(Datepart("w",Now-1))>%tvbs%
[5]for /f "delims=" %%i in ('cscript /nologo %tvbs%') do set YDAY=%%i
[6]del /q %tvbs%
[7]echo Yesterday was %YDAY%
 
T

Timo Salmi

Alexander Suhovey said:
Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

Covered in

DATEINFO.CMD Display date related information
6} How does one get yesterday's date?
31} How many days ago was 31.12.2003? What date was it 100 days ago?

176733 Sep 11 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo
 
A

Alexander Suhovey

-----Original Message-----
From: Timo Salmi [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 10:47 AM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday

Alexander Suhovey said:
Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

Covered in

DATEINFO.CMD Display date related information
6} How does one get yesterday's date?
31} How many days ago was 31.12.2003? What date was it 100 days ago?

176733 Sep 11 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:[email protected] <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html


Timo,

That's really impressive, but talking about 'universal and accurate',
DATEINFO.CMD assumes particular output format of 'date /t' which may be
different across OSes and regions:

============8<===============
C:\Temp>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Temp>date /t
Sun 10/01/2006

C:\Temp> DATEINFO.CMD
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Usage: dateinfo DD MM YYYY
or dateinfo DaysBackwards


C:\Temp> DATEINFO.CMD 01 10 2006
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 1.10.2006
Julian day number : 2454010
Weekday : Sun
Day ordinal number: 274
Week number : 39
Is valid date : True
Days in month : 31

Difference in days: -2454010

C:\Temp>DATEINFO.CMD 365
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

" was unexpected at this time.
Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 24.11.-4714
Julian day number : -365
Weekday :
Day ordinal number: 328
Week number : 48
Is valid date : True
Days in month : 30

Difference in days: 365

C:\Temp>
============8<===============


From the other hand, more sophisticated scripting languages have
date/time maths builtin and don't rely on regional settings of the OS.
DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.
 
A

Alexander Suhovey

-----Original Message-----
From: Timo Salmi [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 10:47 AM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday

Alexander Suhovey said:
Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

Covered in

DATEINFO.CMD Display date related information
6} How does one get yesterday's date?
31} How many days ago was 31.12.2003? What date was it 100 days ago?

176733 Sep 11 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:[email protected] <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html

Timo,

That's really impressive, but talking about 'universal and accurate',
DATEINFO.CMD assumes particular output format of 'date /t' which may be
different across OSes and regions:

============8<===============
C:\Temp>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Temp>date /t
Sun 10/01/2006

C:\Temp> DATEINFO.CMD
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Usage: dateinfo DD MM YYYY
or dateinfo DaysBackwards


C:\Temp> DATEINFO.CMD 01 10 2006
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 1.10.2006
Julian day number : 2454010
Weekday : Sun
Day ordinal number: 274
Week number : 39
Is valid date : True
Days in month : 31

Difference in days: -2454010

C:\Temp>DATEINFO.CMD 365
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

" was unexpected at this time.
Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 24.11.-4714
Julian day number : -365
Weekday :
Day ordinal number: 328
Week number : 48
Is valid date : True
Days in month : 30

Difference in days: 365

C:\Temp>
============8<===============


From the other hand, more sophisticated scripting languages have
date/time maths builtin and don't rely on regional settings of the OS.
DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.
 
B

billious

Alexander Suhovey said:
-----Original Message-----
From: Timo Salmi [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 10:47 AM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday

Alexander Suhovey said:
Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

Covered in

DATEINFO.CMD Display date related information
6} How does one get yesterday's date?
31} How many days ago was 31.12.2003? What date was it 100 days ago?

176733 Sep 11 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:[email protected] <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html

Timo,

That's really impressive, but talking about 'universal and accurate',
DATEINFO.CMD assumes particular output format of 'date /t' which may be
different across OSes and regions:

============8<===============
C:\Temp>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Temp>date /t
Sun 10/01/2006

C:\Temp> DATEINFO.CMD
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Usage: dateinfo DD MM YYYY
or dateinfo DaysBackwards


C:\Temp> DATEINFO.CMD 01 10 2006
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 1.10.2006
Julian day number : 2454010
Weekday : Sun
Day ordinal number: 274
Week number : 39
Is valid date : True
Days in month : 31

Difference in days: -2454010

C:\Temp>DATEINFO.CMD 365
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

" was unexpected at this time.
Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 24.11.-4714
Julian day number : -365
Weekday :
Day ordinal number: 328
Week number : 48
Is valid date : True
Days in month : 30

Difference in days: 365

C:\Temp>
============8<===============


From the other hand, more sophisticated scripting languages have
date/time maths builtin and don't rely on regional settings of the OS.
DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.

Yes, but a VBScript solution is a VB solution in a script format, and fits
in better with VB groups like
microsoft.public.programming.scripting.vbscript,microsoft.public.scripting.vbscript
or microsoft.public.vbscript, not script groups.

Claiming VBS files are script solutions is like describing a batchfile
consisting of a sequence of .wav and .jpg invocations as "scripting a
multimedia composition."
 
T

Timo Salmi

That's really impressive, but talking about 'universal and accurate',
DATEINFO.CMD assumes particular output format of 'date /t' which may be
different across OSes and regions:
C:\Temp>date /t
Sun 10/01/2006

Yes. That is true. Therefore, I state within DATEINFO.CMD
rem Assumes the date format DD.MM.YYYY - Else customize
rem To check, see if "DATEINFO 0" produces the current date.
rem Convention: Weeks start on Mondays

Anyone with the rudiments of cmd script writing can easily localize the
code. Furthermore, there are several scripts methods to get the date as
noted in
1} How to get today's date elements into environment variables?
From the other hand, more sophisticated scripting languages have
date/time maths builtin and don't rely on regional settings of the OS.
DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.

Yes, naturally. That option is also covered in my material.

All the best, Timo
 
A

Alexander Suhovey

-----Original Message-----
From: billious [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 5:16 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday


Alexander Suhovey said:
-----Original Message-----
From: Timo Salmi [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 10:47 AM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday

Deling with date maths in batch scripts can be quite a pain since you
basically need to implement it by your self.

Covered in

DATEINFO.CMD Display date related information
6} How does one get yesterday's date?
31} How many days ago was 31.12.2003? What date was it 100 days ago?

176733 Sep 11 2006 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:[email protected] <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at
http://www.uwasa.fi/~ts/http/tsfaq.html

Timo,

That's really impressive, but talking about 'universal and accurate',
DATEINFO.CMD assumes particular output format of 'date /t' which may be
different across OSes and regions:

============8<===============
C:\Temp>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Temp>date /t
Sun 10/01/2006

C:\Temp> DATEINFO.CMD
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Usage: dateinfo DD MM YYYY
or dateinfo DaysBackwards


C:\Temp> DATEINFO.CMD 01 10 2006
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 1.10.2006
Julian day number : 2454010
Weekday : Sun
Day ordinal number: 274
Week number : 39
Is valid date : True
Days in month : 31

Difference in days: -2454010

C:\Temp>DATEINFO.CMD 365
+-------------------------------------------------------+
| DATEINFO.CMD to display some date related information |
| By Prof. Timo Salmi, Last modified Mon 11-Sep-2006 |
+-------------------------------------------------------+

" was unexpected at this time.
Today: Sun 10.1.2006
Julian day number :
Weekday :
Day ordinal number:
Week number :
Days in month : 31

Date : 24.11.-4714
Julian day number : -365
Weekday :
Day ordinal number: 328
Week number : 48
Is valid date : True
Days in month : 30

Difference in days: 365

C:\Temp>
============8<===============


From the other hand, more sophisticated scripting languages have
date/time maths builtin and don't rely on regional settings of the OS.
DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.

Yes, but a VBScript solution is a VB solution in a script format, and fits
in better with VB groups like
microsoft.public.programming.scripting.vbscript,microsoft.public.scripti
ng.vbscr
ipt
or microsoft.public.vbscript, not script groups.

Claiming VBS files are script solutions is like describing a batchfile
consisting of a sequence of .wav and .jpg invocations as "scripting a
multimedia composition."

Well, I'm not sure if I can agree with that.

microsoft.public.win2000.cmdprompt.admin is perfect for anything that
covers windows2000 command prompt administration and cscript fits
perfectly here since its CLI part of WSH.

As for Visual Basic Scripting Edition not being scripting language -
It's new for me. I'm not sure I understand your analogy regarding wav
and jpg invocations. Can you please elaborate on your definition of what
is and is not scripting?

For me script is a series of commands that are interpreted by scripting
host at runtime. CMD in addition to being an interactive shell has
scripting language. ftp.exe, netsh and several others also have
scripting capabilities though very limited to the point that one could
argue that it's not a language.

cscript however is scripting host natively supported by Windows with
scripting language whose superiority over cmd's one I think is obvious.
 
B

billious

Alexander Suhovey said:
-----Original Message-----
From: billious [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 5:16 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday

DATEINFO is 250 lines of code while in VBScript anything you would ever
need to do with dates will fit in a single line of code.

Yes, but a VBScript solution is a VB solution in a script format, and fits
in better with VB groups like
microsoft.public.programming.scripting.vbscript,microsoft.public.scripti
ng.vbscr
ipt
or microsoft.public.vbscript, not script groups.

Claiming VBS files are script solutions is like describing a batchfile
consisting of a sequence of .wav and .jpg invocations as "scripting a
multimedia composition."

Well, I'm not sure if I can agree with that.

microsoft.public.win2000.cmdprompt.admin is perfect for anything that
covers windows2000 command prompt administration and cscript fits
perfectly here since its CLI part of WSH.

As for Visual Basic Scripting Edition not being scripting language -
It's new for me. I'm not sure I understand your analogy regarding wav
and jpg invocations. Can you please elaborate on your definition of what
is and is not scripting?

For me script is a series of commands that are interpreted by scripting
host at runtime. CMD in addition to being an interactive shell has
scripting language. ftp.exe, netsh and several others also have
scripting capabilities though very limited to the point that one could
argue that it's not a language.

cscript however is scripting host natively supported by Windows with
scripting language whose superiority over cmd's one I think is obvious.

No need for a war about it - it really depends on where you define the
borders of "scripting" - and this group seems to be oriented toward
"cmdprompt" and hence CMD.EXE

People used to post QBASIC programs in alt.msdos.batch, surround them with a
batchscript shell, and claim that they were therefore batch solutions. Same
thing with assembler. Yet they disregarded the QBASIC and assembler groups.

Now we have VBScript, described by Microsoft as "Visual Basic Scripting
Edition"
(http://msdn.microsoft.com/library/d...html/0a8270d7-7d8f-4368-b2a7-065acb52fc54.asp)
- and effectively the same discussion.

In creating a VBScript solution, are you programming a script, or are you
programming in VBasic and invoking it via a script? I believe the latter -
and since there are already THREE separate Microsoft VBScript groups, then
why is it necessary to use the "it's scripting" excuse to make this group
yet another VBScript group - that is IN ADDITION to the NON-Microsoft
VBScript groups AND the VB groups?

Actually, this is a CMDPROMPT group - what the "admin" has to do with
anything is beyond me. It's the closest Microsoft... group to a batch group,
hence it's apparently the default for batch.

So if we have a batch

start "" somesound.wav
start "" somemovie.mpg
start "" somepicture.jpg

this is undoubtedly a batchfile, and a script file - but is it a multimedia
file?

By the same token, invoking a .vbs file may or may not be scripting - but is
certainly programming in VB, for which there are already many groups.

And on the same theme, there are perpetual advocates of 4DOS and similar
replacement command-processors who make similar advocations for their
preferred software, regardless of the fact that there are groups dedicated
to discussion of THOSE things too.
 
T

Timo Salmi

No need for a war about it - it really depends on where you define
the borders of "scripting" - and this group seems to be oriented
toward "cmdprompt" and hence CMD.EXE
People used to post QBASIC programs in alt.msdos.batch, surround them
with a batchscript shell, and claim that they were therefore batch
solutions. Same thing with assembler. Yet they disregarded the QBASIC
and assembler groups.

Agreed. The "wrapping" seems to have been the decisive factor. Makes
sense. Personally, I concur to have the line where the solution is an
unequivocal batch. It can, however, involve aids, like VBS or even third
party type of programs such as SED, AWK, HUNT, QBASIC, and so on.
And on the same theme, there are perpetual advocates of 4DOS and
similar replacement command-processors who make similar advocations
for their preferred software, regardless of the fact that there are
groups dedicated to discussion of THOSE things too.

That is slightly different, since that usually is not just elementary
wrapping. A more fundamental change of the command environment is
involved. However, even some 4DOS solutions can be wrapped as ordinary
batches, at least for MS-DOS+Win../95/98/Me.

Anyway, these facets have been much discussed in alt.msdos.batch at an
earlier time, as you will recall.

All the best, Timo
 
A

Alexander Suhovey

-----Original Message-----
From: billious [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 7:41 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday


Alexander Suhovey said:
-----Original Message-----
From: billious [mailto:[email protected]]
Posted At: Sunday, October 01, 2006 5:16 PM
Posted To: microsoft.public.win2000.cmdprompt.admin
Conversation: need help getting yesterday
Subject: Re: need help getting yesterday


DATEINFO is 250 lines of code while in VBScript anything you
would
ever
need to do with dates will fit in a single line of code.


--
Alexander Suhovey


Yes, but a VBScript solution is a VB solution in a script format,
and
fits
in better with VB groups like
microsoft.public.programming.scripting.vbscript,microsoft.public.scripti
ng.vbscr
ipt
or microsoft.public.vbscript, not script groups.

Claiming VBS files are script solutions is like describing a batchfile
consisting of a sequence of .wav and .jpg invocations as "scripting a
multimedia composition."

Well, I'm not sure if I can agree with that.

microsoft.public.win2000.cmdprompt.admin is perfect for anything that
covers windows2000 command prompt administration and cscript fits
perfectly here since its CLI part of WSH.

As for Visual Basic Scripting Edition not being scripting language -
It's new for me. I'm not sure I understand your analogy regarding wav
and jpg invocations. Can you please elaborate on your definition of what
is and is not scripting?

For me script is a series of commands that are interpreted by scripting
host at runtime. CMD in addition to being an interactive shell has
scripting language. ftp.exe, netsh and several others also have
scripting capabilities though very limited to the point that one could
argue that it's not a language.

cscript however is scripting host natively supported by Windows with
scripting language whose superiority over cmd's one I think is obvious.

No need for a war about it - it really depends on where you define the
borders of "scripting" - and this group seems to be oriented toward
"cmdprompt" and hence CMD.EXE

People used to post QBASIC programs in alt.msdos.batch, surround them with
a
batchscript shell, and claim that they were therefore batch solutions. Same
thing with assembler. Yet they disregarded the QBASIC and assembler groups.

Now we have VBScript, described by Microsoft as "Visual Basic Scripting
Edition"
(http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/script56/html/0a8270d7-7d8f-4368-b2a7-065acb52fc54.asp)
- and effectively the same discussion.

In creating a VBScript solution, are you programming a script, or are you
programming in VBasic and invoking it via a script? I believe the latter -
and since there are already THREE separate Microsoft VBScript groups, then
why is it necessary to use the "it's scripting" excuse to make this group
yet another VBScript group - that is IN ADDITION to the NON-Microsoft
VBScript groups AND the VB groups?

Actually, this is a CMDPROMPT group - what the "admin" has to do with
anything is beyond me. It's the closest Microsoft... group to a batch group,
hence it's apparently the default for batch.

So if we have a batch

start "" somesound.wav
start "" somemovie.mpg
start "" somepicture.jpg

this is undoubtedly a batchfile, and a script file - but is it a multimedia
file?

By the same token, invoking a .vbs file may or may not be scripting - but is
certainly programming in VB, for which there are already many groups.

And on the same theme, there are perpetual advocates of 4DOS and similar
replacement command-processors who make similar advocations for their
preferred software, regardless of the fact that there are groups dedicated
to discussion of THOSE things too.

bilious,

No war here. I love batch scripts. But in case of date/time math?
Puh-leese...

'cmdprompt' does not seem to me like same as 'batch'. I thought this
group would cover any CLI-based administration in Windows. Builtin
preferably, yes, so 4DOS and the like probably does not belong here. But
I don't see any point in trying to limit yourself or anybody asking
questions here to batch only if there are other better builtin
scriptable comman-line ways to get the job done. Again, in this case vbs
solution integrates nicely in existing batch scripts without any
third-party tools and/or system reconfiguration.

Now, on your question:
In creating a VBScript solution, are you programming a script, or are you
programming in VBasic and invoking it via a script?
It's first obviously. Same as with cmd/bat files: you write a script,
you run it. For batch/cmd you have a cmd.exe interpreter, for vbs/js -
wscript.exe and cscript.exe parts of Windows Scripting Host (WSH). Sure,
since the only CLI shell available in 2k out of the box is cmd.exe,
cscript as a CLI utility just has to be run in cmd but this doesn't make
vbs less of a scripting any bit.
Actually, this is a CMDPROMPT group - what the "admin" has to do with
anything is beyond me
Probably it's because you are just too concentrated on cmd part. I read
this group name as "Windows 2000 command line administration" which in
no way limits it to batch scripts.
So if we have a batch

start "" somesound.wav
start "" somemovie.mpg
start "" somepicture.jpg

this is undoubtedly a batchfile, and a script file - but is it a multimedia
file?
Same as
WScript.Run ("somesound.wav")
WScript.Run ("somemovie.mpg")
WScript.Run ("somepicture.jpg")

Is undoubtedly a [part of] vbs file and a script file, but it is not
multimedia file.
By the same token, invoking a .vbs file may or may not be scripting - but is
certainly programming in VB, for which there are already many groups.
Invoking vbs file is in no way different as invoking bat file. It's
invoking the script with appropriate script handler.
is it necessary to use the "it's scripting" excuse to make this group
yet another VBScript group - that is IN ADDITION to the NON-Microsoft
VBScript groups AND the VB groups?
Not necessary at all. Nobody tries. At least I'm not. What I did is I've
tried to provide the best solution to the problem. If OP decides to take
a deeper look at WSH, (s)he probably will better ask vbs-related
questions in dedicated groups. I personally use cmd scripts A LOT. As
well as WSH. I just use the best tool to get the job done. Preferably
the tool that already there out of the box. In some cases it is batch.
In this particular case it's undoubtedly vbs/js. I don't see any point
in making things harder just for the sake of "pure batch only". Let's
say you stick to the batch scripting no matter what. Do you use ping,
ipconfig, netsh, ftp -s, net <subcommand>, you name it in your batch
scripts? Leave alone whole scripting or not discussion- Why not cscript
/nologo %tvbs% then?..
I just fail to see any point in this.
And on the same theme, there are perpetual advocates of 4DOS and similar
replacement command-processors who make similar advocations for their
preferred software, regardless of the fact that there are groups dedicated
to discussion of THOSE things too.
It's not on the same theme. WSH is not a replacement to command
processor. It's another (more powerful) builtin scripting host that was
there in Windows for aeons. And for the dedicated group, I've already
mentioned my view on what this group is about.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top