srp@cgl.ucsf.edu (Scott R. Presnell%Langridge) (05/26/88)
Hello,
I am looking for the sources to a program called rename, which
alters the names of the files on the command line based string arguments
given. I would appreciate it if someone, or the author could mail me the
sources to this program (I lost the orignals in a move). Thanks very
much. Below is a partial listing of the man page...
NAME
rename - change the names of a set of files.
SYNOPSIS
rename [-i] file [...] <str1>^|=<str2>
DESCRIPTION
Rename will change the names of all the given files accord-
ing to the command specified as the last argument. The -i
(interactive) option will prompt the user if the resulting
file already exists.
.
.
.
AUTHOR
Gilles Chartrand
--
Scott Presnell +1 415 476 5326
Copmuter Graphics Laboratory; MacroMolecular Workbench Project, S-926
Univ. of Calif. at San Francisco (UCSF), San Francisco, CA. 94143
Internet: srp@cgl.ucsf.edu UUCP: ucbvax!ucsfcgl!srp Bitnet: srp@ucsfcgl.bitnetgandalf@csli.STANFORD.EDU (Juergen Wagner) (05/27/88)
You should be able to pull this program out of the comp.sources.misc archives
somewhere. If not, I have written a renaming program which does what is
described in the man page, plus some extra stuff:
RENAME(1J) Gandalf's Utilities Box RENAME(1J)
NAME
rename - change the names of a set of files
SYNOPSIS
rename specs... files...
DESCRIPTION
Rename will change the names of all the given files accord-
ing to the replacement instructions and flags supplied in
specs. The following options are available:
-i (interactive) will prompt the user if the resulting
file already exists.
-v (verbose) produces a verbose protocol of what the pro-
gram does.
-l (lowercase) coerces all characters to lowercase charac-
ters before any substitutions are performed.
-t (trailing dot) remove any trailing dots from the file
names before any substitutions are performed.
-n (cut chars) cut the first n characters off the original
filename before any substitutions are performed.
The valid replacement specifications are
old=new
Replace all occurrences of old in a file name by the
string new (no recursive substitutions, replacement is
done left to right).
string=
Delete the substring string in all file names.
^prefix
Use this prefix for all file names.
=suffix
Append this suffix to all file names.
AUTHOR
Juergen Wagner, CSLI, Stanford University
(gandalf@csli.stanford.edu, formerly at Fraunhofer-Institute
IAO, Stuttgart,
Sun Release 3.2 Last change: 5th March, 1987 1
I've used this program a lot when I transferred friles between TOPS20 or
MSDOS and UNIX (remove trailing dots, lowercase file names).
I'll mail it on request.
--
Juergen "Gandalf" Wagner, gandalf@csli.stanford.edu
Center for the Study of Language and Information (CSLI), Stanford CA