Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


NewProject

Built-in

SYNTAX

NewProject (project [-cf commentFile | -cs commentString]
[-dbv version] [-u user]) | -close | -w

DESCRIPTION

The NewProject command creates a new project. This means that the command creates for your project a new directory containing a ProjectDB file. This new project becomes the current project.

You can specify the version of the project database to create using the -dbv version option. By default, NewProject creates a project database of the version specified in the {ProjectorVersion} environment variable, or the latest version if {ProjectorVersion} is undefined.

You can specify the project's name (project), along with any comments about the new project, on the command line. Comments can be placed in either a separate file (-cf commentFile) or in a string on the command line (-cs commentString). You can also indicate a different user name to appear as the creator of the project directory (-u user).

INPUT

None

OUTPUT

None

STATUS

NewProject can return the following status codes:

0

no errors

1

syntax error

2

error in processing

3

system error

PARAMETERS

project

Names the project. If you specify project as a leafname (such as Enterprise), that project is created as a directory in the current directory.

If you specify it as a project pathname (such as MPW∫Tools∫Enterprise), the last directory named (in this case, Enterprise) becomes the project directory. It is a subdirectory of the directory specified to the left of it (that is, Tools), not the current directory.

Finally, if you specify project as a partial or full pathname (such as :Work:Enterprise or FS:Projects:Enterprise), NewProject creates the project in the specified location.

OPTIONS

-cf commentFile

Specifies a comment contained in the file commentFile.

-close

Closes the New Project window.

-cs commentString

Specifies a comment contained in the string commentString.

-dbv version

Specifies the project database version to create. Valid version numbers are 2 (the previous version) and 3 (the updated version). The default version is 3.

-u user

Names the current user, overriding the {User} MPW Shell variable.

-w

Opens the New Project window shown below.


EXAMPLES

The following command creates the project Enterprise in the current directory. It does not save a comment with the project, but you can add one later by selecting the project in the Check Out window's Info view, which can be opened by clicking the window's ? button. See the description of the -w option of the CheckOut command.

NewProject Enterprise

The next example creates a project named Time in the FS:Work: directory. The -cf option indicates that the comment for the new project is contained in the Info file.

NewProject FS:Work:Time -cf Info

Finally, given that the project Enterprise∫Utilities exists and has been mounted using the MountProject command, the next command creates a Generation project in the Enterprise∫Utilities project. In this case you do not need to add a MountProject command to one of your UserStartup•name files, but you can place a CheckOutDir command there to set the checkout directory for the new project.

NewProject Enterprise∫Utilities∫Generation -cs "Upgrade Generation utility"

SEE ALSO

CheckOutDir

MountProject

Project

 
 


Last Updated July 2000