Could you perform a very basic task in MS-DOS?

I’m actually using ms-dos a bit now to run Perl scripts. Why does linking need Administrator privileges again?

Anyhow I spend most of my day on Linux, and can compose really nice groups of commands. My MS-DOS is braindead in not having command history or command editing like decent shells do, If I do more with it I’ll have to find a decent one like the ones mentioned,
But I’ve owned pre-Windows PCs so the job in the OP is still simple. But I have indeed typed ls first.

something like… c:/list/p/w look n see whats there to .exe

or maybe it was backslashes c:\dir\p\w\list -_-

Spoiler Alert!

dir oldfile.* /s

That should find it, as long as you’re at the root of C.

DOS is actually a mash-up of both UNIX and CP/M – and actually more CP/M than UNIX. Both the external “look and feel” and even more so the internals of DOS (for example, drive letters, the way command-line parameters are passed to the program, the way programs interface to the system and make system requests, etc., etc.) are much more CP/M-like than UNIX-like.

The hierarchical file structure and input/output redirection were inspired by UNIX. Command pipes in DOS are a total veneer designed to cheaply impersonate the UNIX pipes, and don’t work anything at all like real pipes.

Heh. That’s exactly what I thought: as long as they don’t take my phone from me.

But otherwise? I don’t think so. I haven’t used a DOS based computer for half my life, so I doubt I even remember how to rename files let alone copy them.

I’ve got a couple of brain cells sluggishly trying to recall CP/M commands from the days of my first computer, hand built for my business by a friend and having two 8" floppy drives. Woohoo! What a machine! Wasn’t the copy command PIP? But the CP/M equivalent of DIR just isn’t coming back.

I could probably accomplish the OP’s task by dragging DOS painfully into my forebrain, but I might be getting thirsty before I got out of the locked room. Honestly, I’ve been quite happy forgetting all that command-line stuff over the past couple of decades.

Several of the CP/M commands were the same as DOS commands (or, rather, simplified versions of them) – CP/M had those first! DIR was the DIR command. ERA to erase a file (which works in DOS too, IIRC). REN to rename a file – same as DOS. TYPE to list a file onto the screen – same as DOS.

If you’ve done some assembly-level programming with DOS systems, you may recall there’s a system function to display a character string to the screen, where the string to be displayed has to be terminated with a $ character. That came from CP/M too.

To copy files: PIP <destination-file>=<source-file> e.g. PIP A:=B:*.COM
Note the bizarre syntax: destination file first, source file second, separated by = symbol.
This was not original with CP/M – It goes back to early DEC system commands – PDP-8, PDP-10, PDP-11 worked like this. Those early DEC systems were also the origin of file names with extensions, and of the wildcard character * – CP/M borrowed a lot of that. UNIX also borrowed a lot of that right from the start – remember, UNIX was originally implemented on PDP-11 machines, so the guys doing it were already familiar with the DEC systems of the day.

Taking a closer look at some of the on-line CP/M information (there’s plenty there for the Googling):

The REN command likewise followed the DEC syntax: REN <new-file-name>=<old-file-name>
The syntax of putting the result file first followed by the source file was standard across a lot of DEC commands. DOS changed the order of the arguments in its REN command.

CP/M file specs allowed the ? wildcard as well as * – That too, I’m pretty sure, came from early DEC systems. UNIX stole that from DEC too, while DOS, I presume, stole it from CP/M which stole it from DEC.

But, AFAIK, only DEC systems had TECO!

It was kept alive and ported to other systems until ~1999 but is now moribund.

Emacs is its spiritual successor. (3rd par.)

I use some “extensions” that are tiny COM programs that fill in the gaps in DOS functions. Although still useful, they stumble when they encounter mixed case and long names, not to mention extra-large directories. I use some of these so often, I have shortened their names to one or two characters.

D – the shortest way to get a sorted directory in two columns, paginated.

WI – formerly WHEREIS – a rapid (must faster than Windows) search of multiple directories and/or disks with many command-line options. The only command I’ve seen that uses a syntax like this: WI CDE:*.PDF, which means to search drives C,D, and E.

DT – formerly DIRTREE, giving a graphic (within the limits of DOS graphic characters) display of the file tree structure, sideways so it scrolls. More useful than Windows’ folder tree display in some ways.

There’s also SWEEP, which will parse all directories in a specified tree, performing any specified action for each, and a few others like DHELP and THELP, handy references only a geek could love.

Then there’s the Q editor, the best (for programming) editor in the world with very useful (for programming) features that I don’t see in most GUI editors, and a speed that is unmatched.

Piece of cake.
I’d also probably have finger trouble boo-boos with pwd, ls and cp a few times until translate to DOS clicked.

After learning how to “do computer stuff” on Windows machines, my first day at an actual programming job I was sat down at a dumb Unix terminal.

Blank screen with a $ prompt. Steep learning curve that was.
Seldom have cause to use a “DOS” command prompt, maybe ipconfig /blah occasionally. On a *nix command line practically every day.

ps. Glad to see that “tree” still works. Though, having just tried it on the Windows laptop, “forest” would be more appropriate now.

I’m 62 and started using computers in the early 70’s.
So I certainly used to type in DOS commands (like ‘cd finance’ to change to the finance directory.)
It’s been a while though, so I’d need a reminder.

I do remember when the first Apple computer crossed the pond to the UK, and all the company programmers gathered in awe to see the combination of a ‘mouse’ and ‘icons’! :cool:

I learned DOS as a kid growing up. Then I learned some basic Unix in college. I would get frustrated by using the wrong commands and give up.

grep

:stuck_out_tongue:

I’ve programmed using toggle switches. A few DOS commands are a breeze. As long as I can keep DOS and Linux distinct in my head while I do the work.

I learned the RSTS command line and VAX/VMS DCL before DOS ever existed, so command lines scare me not.

I have several C++ programs I wrote that use a call to system() to do stuff quicker than finding the Windows Library equivalents.

I keep my .bats in c:\belfry. Do you, too?

Wow - it’s been years since I’ve even been allowed to monkey about on a DOS screen at work. The IT people frown on it as we old-timers have been known to cause issues when we poke about in DOS, thinking we still know what we’re doing. :smiley:

But yes, I could do a simple task like this in DOS, although it might take me a try or two to get it exactly right. I’d at least know exactly how to begin.

I finally found the details of a recent time I could do something in command prompt that I couldn’t go in the GUI.

We needed to copy a file mscorlib.ni.dll from a user’s computer to help debug an issue. If you go to C:\Windows\assembly\NativeImages_v4.0.30319_32\ from a command prompt, there are subfolders that contain versions of that file.
If you go to that folder in explorer though, they are presented like services, that you can uninstall but cannot copy.

Probably not an everyday task for most people, but just trying to give a concrete example that there are still some tasks where the command prompt is still useful :slight_smile: