CFOG's PIP, October 1988, Volume 7 No. 5, Whole No. 67, page 66

NewSweep Tutorial -- Part X -- Reprise on Rename

by Benjamin H. Cohen

Copyright 1988, All Rights Reserved

[This is a conclusion to a series that I started long ago and which never quite got finished. I've decided that it was high time to finish it off and so I've done it. The final "two" installments are published in this one issue. A complete reprint of the series is available from CFOG, Box 1674, Chicago, IL 60690, for $2.00. Please enclose a stamped (45 cents) return addressed #10 (business size) envelope. -- bhc]

First, let's be completely retrograde. Remember how I told you to rename a file with NewSweep, way back in Part I? Well, I left two things out.

First, remember that I said that user areas are just part of a file's name? If the question has occurred to you, the answer is, yes, you can change the user area when you ask NewSweep to rename a file. Suppose you have a file named BIG.TXT and you want to move it from A0: to A3:. Load up NewSweep, and space down to BIG.TXT. Hit the "R" and there's the prompt

3.  A0:  BIG     .TXT   19K : r  New name or *?

Just enter "A3:BIG.TXT" and NewSweep will 'move' the file to user area 3. NewSweep doesn't 'move' the file, it simply changes the the directory to indicate that BIG.TXT is in user area 3.

The second thing I left out is the other option you have when renaming files. Note the prompt: "New name or *". Whats the "*"? That's the CP/M standard wildcard. What it's doing here is offering you to do a wildcard rename. Press the * and you'll be prompted first for the old name and then for the new name.

This part is just a bit tricky: the wildcarding has to be equivalent in the new name to the wildcarding in the old name. But suppose I was writing a book, Bird Watchers of North America, and I called all my chapters by the name CHAPTER.nnn, starting with 001 and going up to 031. Now I have a new book, Bird Watchers of Europe, and I want to use the same scheme, but I realize that I should have called the first set of chapters by a mnemonic of the title of the book, such as NABDWTCH.001, etc. Then I can call the second book's chapters EUBDWTCH.001, etc. NewSweep's wildcard rename to the rescue. Hit that "*" and for the old name enter "CHAPTER.*". For the new name enter "NABDWTCH.*". Just sit back and watch NewSweep rename those chapters.