Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

writing batch files is NOT like learning to ride a bicycle.......

0 views
Skip to first unread message

jackp...@astraweb.com

unread,
Mar 7, 2021, 6:47:22 PM3/7/21
to
Years of gui-happy program operations have left my once reasonable acumen and the ability to dash off a
batch file in a literal shambles.
I wrote a 'getdate.bat' to prep the system date for filename usage in win 7 a few years ago, but it was
not nearly as elegant as those i have seen here using the for/in/do statements. The following batch
file is only included to give an idea of where i got to in batch files. and most were written 20-25
years ago. But i did manage to fumble through this one a few years ago.......
~~~~~~~~~~~~~~~~~~
echo %date%

set mth=%Date:~4,2%
set day=%Date:~7,2%
set yr=%Date:~10,4%

echo %mth%%day%%yr%

set shortdate=%mth%%day%%yr%

echo %shortdate%

Pause

~~~~~~~~~~~~~~~~~~

Now, I realize that i have forgotten most batch principles and commands.

I want to write front-end bat for a rather large command-line program called youtube-dl which, when the
.bat is initiated does a few things, and stops multiple times for keyboard input along the way to
execution, and then continues on with that new information.
I will start out a command line with boilerplate of "youtube-dl -f 18 -i".

Any help?

Auric__

unread,
Mar 7, 2021, 9:39:23 PM3/7/21
to
jackpatton wrote:

> Years of gui-happy program operations have left my once reasonable
> acumen and the ability to dash off a batch file in a literal shambles.
> I wrote a 'getdate.bat' to prep the system date for filename usage in
> win 7 a few years ago, but it was not nearly as elegant as those i have
> seen here using the for/in/do statements. The following batch file is
> only included to give an idea of where i got to in batch files. and most
> were written 20-25 years ago. But i did manage to fumble through this
> one a few years ago.......
[snip]
> Now, I realize that i have forgotten most batch principles and commands.
>
> I want to write front-end bat for a rather large command-line program
> called youtube-dl which, when the .bat is initiated does a few things,
> and stops multiple times for keyboard input along the way to execution,
> and then continues on with that new information. I will start out a
> command line with boilerplate of "youtube-dl -f 18 -i".
>
> Any help?

Only to point you to alt.msdos.batch.nt and Timo Salmi's FAQ:

http://www.elisanet.fi/tsalmi/info/tscmd.html

--
People who see life as anything more than pure entertainment
are missing the point.
-- George Carlin

jackp...@astraweb.com

unread,
Mar 9, 2021, 4:02:16 PM3/9/21
to
Thanks!

0 new messages