I’d like to move a large number of files stored in a number of directories up one level.
That is to say I have fileA in c:\Storage\DirectoryA and fileB in c:\Storage\DirectoryB (and so on) ; and would like to automagically move all of the files to c:\Storage.
Obviously I could do it all by cut/paste, but a) it’d be a pain in my neck and b) I figure there must be a way to do that via DOS command line.
Thanks a bunch, guys ! All done and neat. Now to reorganize them the right way. Don’t you just hate working with someone else’s silly illogical probably insane file sorting/naming scheme ?
I’m disappointed. I thought this was going to be a question about DOS/Batch, the spanking new operating system for the PDP 11 computer, circa 1975. Those were the days.
[Pointless Anecdote] For a couple years in the late-mid-90s I went to a JC for a Microcomputer Support certificate. All that stood in my way was an introductory MS-DOS class. I asked the department head, “Ma’am, if you have any openings I could TEACH that class. May I substitute a class with a future?”
Just a general point, but shuffling files within a directory structure like this has disaster written all over it - I speak from experience! It’s generally a better idea to copy the files to a new directory, then rename the directories. And only after you’ve checked everything delete the old files.
This actually isn’t too hard in the GUI, in my opinion. It is copy and paste, but it’s a single operation. Open the directory. Do a search for .. Right click and select all, then right click cut. Then hit back to get back to the folder without search, and click paste. Delete any folders.
Well, that is, unless there were files like C:\A\B\D that you wanted to move to C:\A\D. Then command line is probably better.
But ^C is right next to ^V and I’ve had horrid things happen when the wrong one gets hit. The right menu is slower but safer. (Ditto the insert/delete keys shouldn’t be next to each other either for safety reasons.)
I do this all the time, do a (previous) paste when I meant to do a new copy. Fortunately CTRL+Z always works as an undo (in Windows anyway, don’t know about Macs).
FWIW the story I heard as to why those keys were chosen:
[ul]
[li]CTRL+X = **Cut **because an X looks like a pair of scissors[/li][li]CTRL+C = **Copy **because copy begins with C[/li][li]CTRL+V = **Paste **because, well, because it’s right next to X and C (probably why CTRL+Z was also chosen)[/li]
and I assume:
[li]CTRL+A = Select All because all begins with A[/li]
and going back to command line days:
[li]CTRL+S = pause (or Stop)[/li][li]CTRL+Q = continue because you can hold CTRL and alternately press S and Q easily with your index and middle fingers[/li][/ul]
Ctrl-S (X-OFF) and Ctrl-Q (X-ON) go back way farther than that. Once upon a time, before ASCII terminals were ever connected to computers, you had mechanical Teletypes connected to modems, connected to phone lines, connected to a modem at the other end, connected to a Teletype. No computers in the middle. Those were the days when communication by telegraph had progressed beyond using simple clicks and Morse code.
Many of the codes we now call “Control Characters” were, in those days, really used as control characters. Control-D, for example, literally meant “End of Conversation” and caused the modem to hang up. Control-G rang the bell on the teletype. Control-M was literally Carriage Return, and Control-J was literally Line Feed. A bunch of other control characters has various physical, mechanical actions. (Tab, Vertical Tab, Form-Feed, etc.)
If the receiving unit could not keep pace with the sending unit, it could send X-OFF (Ctrl-S) to tell the sending unit to pause, then send X-ON (Ctrl-Q) to tell the sending unit to resume. Hopefully, most sending units were smart enough to comply.
Attaching Teletype terminals to interactive computers came later.