CHSUF(1)              User Commands Guide              CHSUF(1)





NAME
       chsuf - changes the suffix of files

SYNOPSIS
       chsuf [ OPTION ]...  --append=suffix  file ...

       chsuf [ OPTION ]...  --delete[=suffix]  file ...

       chsuf [ OPTION ]...  [ --from=oldsuffix ]  --to=newsuf-
       fix  file ...

       chsuf [ --version ]

DESCRIPTION
       chsuf changes the suffix of files and/or directories.
       It also can be used to add or remove a suffix to/from a
       list of files.

       chsuf might be useful to change DOS-style three charac-
       ter extensions to more readable variations (eg htm to
       html), or to add an extension to filenames for later use
       on platforms which depend on them.

OPTIONS
       --append=suffix
               Add the suffix given by --append to the name of
               all given files.  --from, --to and --delete will
               be ignored when this option is used.

       --delete[ =suffix ]
               Delete the specified suffix from the name of all
               given files.  When no suffix is, the shortest
               arbitrary suffix (if any) will be deleted.

       -i, --interactive
               Prompt whether or not to overwrite existing reg-
               ular destination files.

       -r, --recursive
               Recursively enter directories to change suf-
               fixes.

       -d, --rename-dirs
               Modify directory names as well as file names.

       -v, --verbose
               Be verbose and print every filename changed.

       -V, --version
               Show the release version of chsuf.  All other
               options will be ignored.

       --from=oldsuffix
               In conjuction with --to specifies the suffix to
               be changed, omitting period.  Files with other
               suffixes will not be renamed.  When --append or
               --delete is used this will be ignored.

       --to=newsuffix
               This is the suffix to change to, omitting the
               period.  When no suffix is given by using
               --from, the shortest arbitrary suffix (if any)
               will be changed. When --append or --delete is
               used this will be ignored.

EXAMPLES
       You may have some HTML-files from different sources;
       some ending .htm, some ending .html.  As a
       GNU/Linux/Unix (whatever) user you want to only use
       .html so you can type:

           chsuf --from="htm" --to="html" *

       If you also want to change the files in subdirectories,
       you would use:

           chsuf -r --from="htm" --to="html" *

       Finally, if you would like to be told what's being done
       add -v or --verbose:

           chsuf -rv --from="htm" --to="html" *

       Let's say you want to export a bunch of text files to a
       system which expects the names of textfiles to end with
       .txt.  To do this you can use:

           chsuf -v --append="txt" texts/*

       In case you have files from a lousy system which
       requires such extensions and you want to get rid of the
       annoying .txt suffixes you will type:

           chsuf -v --delete="txt" texts/*

       if you want to remove all the suffixes of all the files
       in the directory and all sub-directories use:

           chsuf -v --rename-dirs --recursive --delete *

       or, for short:

           chsuf -vdr --delete *


BUGS
       Many, for sure! This is still a beta, you know...

NOTES
       A more general tool using regexps to rename files would
       be much more powerful but also much harder to use.

SEE ALSO
       mv(1), cp(1)

AUTHORS
       Sascha Wilde <swilde@users.sourceforge.net>, Daniel
       Roberge <droberge@users.sourceforge.net>

THANKS
       To Phil Williams <phil@subbacultcha.demon.co.uk> for
       beta-testing, ideas and suggestions.



2002-02-10                Version 0.9                  CHSUF(1)
