PLOGHELP RENAME                            Jonathan Laventhol, July 1983
                                Revised by Kathryn Seifert  October 1986

Predicate to rename files

    ?- rename(Oldname, Newname).
    ?- rename(Filename, []).

Keywords: system,  DEC10, compatibility, files


This predicate is provided primarily for compatibility with DEC-10
Prolog, as a means of renaming or removing files from within a Prolog
program. The features available on VMS and Unix are slightly different.
Both are described below.

If you want to get rid of files yourself, you are probably better off
using the shell on UNIX or DCL on VMS
See HELP * SHELL (UNIX), or HELP * DCL (VMS).


The following goal will rename a file:

    ?- rename(Oldname, Newname).

You can also delete files, like this:

    ?- rename(Filename, []).

(On VMS only: When specifying a file, you can use the asterisk, "*", as
a wildcard -- it will match anything.  Also, you can leave out parts in
the new name, and they will default to the corresponding parts in the
old name.)

Be careful when you delete things: when they're gone they are gone.

Examples:

Get rid of the file 'junk.pl'

    ?- rename('junk.pl', [])

Rename 'today.pl' to 'yesterday.pl'

    ?- rename('today.pl', 'yesterday.pl').

On VMS you can get rid of all versions of the file 'junk.pl', thus:

    ?- rename('junk.pl;*', [])

Sometimes on Unix you get a message like this:

    rm: override protection 644 for foo?

which means that the file claims that it is protected and you shouldn't
delete it, but you can if you want to in some cases. Type "yes" or "no"
and then a return.

-- RELATED DOCUMENTATION ----------------------------------------------

HELP * DCL  (VMS only)
 Basics of the VMS operating system

HELP * SHELL (Unix only)
 Basics of the UNIX operating system

PLOGHELP * COMPATIBILITY
 DEC10 predicates not implemented in POPLOG Prolog

PLOGHELP * DEC10
 Library file to change operator precedences to those of DEC10 Prolog

-----<Copyright University of Sussex 1986.  All rights reserved.>-------
