FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


KEEP EXISTING FILES

Syntax:

KEEP EXISTING FILES

[DO NOT] OVERWRITE [EXISTING] [FILES]

Function:

This command specifies the action to be taken if a name clash occurs between output files written by FPT and existing files in the output directory.

OVERWRITE EXISTING FILES instructs FPT to overwrite (or on VMS systems to supersede) existing files without warnings.

KEEP EXISTING FILES instructs FPT to rename the output files so as to avoid name clashes. Messages are written to the user's terminal and to the listing file to indicate which files have been renamed.

FPT always overwrites a listing, FPL, file if this is present. It also deletes or overwrites the temporary listing file, FPL.FPL, which is used if no valid input file name is encountered.

FPT never overwrites a file which it has already written in the current pass. If a name clash occurs between two different output files, FPT renames one of them. This could occur, for example, if two different versions of the same INCLUDE file were referenced in the Fortran code from different directories, e.g.

SUBROUTINE transpiration INCLUDE 'C:\RICE\S_ISL\PRECIP.DAT' : : END SUBROUTINE : SUBROUTINE groundwater INCLUDE 'C:\RICE\HOKK\PRECIP.DAT' : END SUBROUTINE

Two different files, both named PREC_DAT.INC might be written. The second is renamed PRE0_DAT.INC.

Name clashes between input and output files may be avoided by redirecting the Fortran output or by reading the input from a different directory. The relevant commands are:

OUTPUT DIRECTORY <directory>

PRIMARY OUTPUT DIRECTORY <directory>

INCLUDE OUTPUT DIRECTORY <directory>

INPUT DIRECTORY <directory>

PRIMARY INPUT DIRECTORY <directory>

PRIMARY INPUT SEARCH PATH <string> <string> ...

INCLUDE INPUT SEARCH PATH <string> <string> ...

Name clashes may also be avoided by changing the output file name extensions by the commands:

NEW FILE NAME EXTENSIONS

OUTPUT FILE NAME EXTENSION <string>

PRIMARY OUTPUT FILE NAME EXTENSION <string>

INCLUDE OUTPUT FILE NAME EXTENSION <string>

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

Yes


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

Yes


Interactive command files

Yes


Embedded in the Fortran code

Yes


Default:

DO NOT OVERWRITE EXISTING FILES

(Note that defaults may be changed in the configuration file)

Example:

! TR2.FSP - Specification file for tr2
tr2.f
terr.f
wind.f
%keep existing files ! Do not overwrite anything already there

See also:

INPUT DIRECTORY

PRIMARY INPUT DIRECTORY

INCLUDE INPUT DIRECTORY

INCLUDE INPUT SEARCH PATH

PRIMARY INPUT SEARCH PATH

OUTPUT FILE NAME EXTENSION

PRIMARY OUTPUT FILE NAME EXTENSION

INCLUDE OUTPUT FILE NAME EXTENSION

OUTPUT DIRECTORY

PRIMARY OUTPUT DIRECTORY

INCLUDE OUTPUT DIRECTORY


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.