|
See the "Rant" button toward the right, just above where you type in your post's subject?
|
|
|
|
|
blush, I do now
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
DOS Batch files have been dead since Windows 95. They were replace by Windows .cmd files, which actually are rather powerful for someone who knows how to use the various commands and their switches.
|
|
|
|
|
Quote: Batch files have been dead since Windows 95 Noooooo! I still use them every day! With Windows 10!
Get me coffee and no one gets hurt!
|
|
|
|
|
I still make heavy use of DOS batch files on our Windows builder that runs the latest version of TeamCity.
Always refused to make use of extra tools such as NANT, but I have to admit that although you can accomplish a lot with batch files, readability is not a strong point of DOS batch files.
|
|
|
|
|
The .bat extension is handled by the same command line processor as the .cmd extension. Both extensions work except in machine startup scripts where you have to use .cmd.
|
|
|
|
|
obermd wrote: Batch files have been dead since Windows 95. Really?
I guess 70% of the world just didn't get that memo.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
"The reports of my death have been greatly exaggerated."
Outside of a dog, a book is a man's best friend; inside of a dog, it's too dark to read. -- Groucho Marx
|
|
|
|
|
I use 'em all the time, they're great.
My main complaint is having to use CALL when I want a subroutine.
|
|
|
|
|
Batch files help me prevent my self from installing bloatware on my windows 10 ... Imagine just opening up notepad typing commands and saving as something.bat .... no bloatware , no mess
|
|
|
|
|
charlieg wrote: I have no idea who came up with this crap, but I will piss on his/her grave.
Off to a real scripting language... Usually, when people make statements along these lines, I reply: Why the elephant do you select a 40+ year old command interpreter language? Why haven't you switched to Powershell many years ago?
The typical answer is, like: Huh?? Powershell? I never cared to look at it, and I am certainly not going to waste my time on it! Why hasn't Windows switched to something like bash? I'll tell you why: Because Windows users simply refuse to learn anything new. They will not realize that with bash, they could write really advanced scripts, but they are simply ignorant and lazy.
Me: Yeah, I guess you are right. Linux guys are far more willing to learn of alternatives to their favorite tools. Just look at yourself, how eager your are to learn the advanced command processor that is native to Windows!
The other guy: Go *** yourself! You are exactly the way Windows guys are. You go ahead first, and learn bash, then you can start patronizing.
Me: I have been using bash for about twenty-five years.
The other guy: So why do you tell me not to use it?
Me: Maybe you are better off getting a bash interpreter for Windows...
|
|
|
|
|
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
bash is just as awful write-only thing as the cmd processor's language. Which parentheses today, and how much of them? Just look at any java starter sh file how much pain is to figure out where java is installed. Debugger support is also outstanding.
|
|
|
|
|
Powershell imho is bat files on steroids. I've looked at it, and well
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
But the real question is:
"Why did the chicken crossed the road?", I betcha you haven't considered that first!
|
|
|
|
|
.BAT files have their uses for quick-and-dirty problems.
I agree that PowerShell is much more powerful, but 99%+ of the time, its power is unnecessary for my uses.
The only advantage that ports of Unix/Linux shells could offer is compatibility with Linux scripts. However, these must typically be rewritten to allow for differing filename formats, missing tools in the Windows environment, etc. so this advantage is illusory.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
You have to remember that .BAT files were invented in the days of floppy disks and command lines, when you didn't want to create a C program that included a 50K library file in order to sort a directory listing by modification date then print it to the display in pages; and another to do it in reverse size order; and another of only show the "ACC*.CSV" files the same way, and ...
That they still work at all, and are of any use - and they are, occasionally I'm sure even if I personally haven't used one in decades - is a testament to just how well they were designed in the first place!
The world has moved on, is all - so we expect more power, more flexibility, better structure.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Because I spend a lot of time using Linux I have a few .bat files on my Windows boxes that mirror my Linux common and aliased commands. I would love Windows to support aliases.
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
I tried to install 4DOS on my Win10 box the other week so I could use aliases. Should I just die in shame?
|
|
|
|
|
Ah yes! 4DOS. That brings me back a way.
|
|
|
|
|
|
truth. The group I work in has a lot of old guys (me included) with some less old guys and one youngster.
The old guys handle the builds and, well, they use BAT files. I'm taking a crash course on python now.
I just want to be able to predictably form strings and what not.
Note: first poster indicated I missed the RANT button. Most of the ranting is at myself.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
BAT for scripting? Bleargh.
BAT for quick automation? Gold.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I'm curious to hear the difference in their definitions.
|
|
|
|
|
Scripting is programming the shell, with complex logic (i.e. conditions, loops, etc).
Quick automation to me means executing a simple sequence of commands with their parameters, with only a very small amount of logic (i.e. setting relative paths, file names and in some cases checking some return value). It's a quick macro, a shortcut to avoid typing dozens of characters.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|