## NAME

g.copy - Copies available data files in the user's current mapset search path and location to the appropriate element directories under the user's current mapset.
(GRASS File Management Program)

## SYNOPSIS

g.copy
g.copy help
g.copy [rast=from,to] [vect=from,to] [icon=from,to] [labels=from,to] [sites=from,to] [region=from,to] [group=from,to]

## DESCRIPTION

A user may access data stored under the other mapsets listed in his mapset search path. However, the user may only modify data stored under his own current mapset. g.copy allows the user to copy existing data files from other mapsets to the user's current mapset ($MAPSET). The files to be copied must exist in the user's current mapset search path and location; output is sent to the relevant data element directory(ies) under the user's current mapset.

## OPTIONS

The user specifies the type(s) of data files he wishes to copy (raster, vector, etc.), the name of the existing file to be copied (i.e., the from file name), and the name of the new file copy to be placed in the user's current mapset (the to file name). This information can be given either (non-interactively) on the command line, or entered in response to program prompts given via the standard parser interface.

Information can be entered on the command line in the following format:

  g.copy [rast=from,to] [vect=from,to] [icon=from,to] [labels=from,to] [sites=from,to] [region=from,to] [group=from,to]

For example, if the user wished to copy the existing raster file soils to a file called soils.ph and to copy an existing vector file roads to a file called rds.old, the user could type:

  g.copy rast=soils,soils.ph vect=roads,rds.old

Data files can also be specified by their mapsets. For example, the below command copies the raster file named soils from the mapset wilson to a new file called soils to be placed under the user's current mapset:

  g.copy rast='soils@wilson',soils

If no mapset name is specified, g.copy searches for the named from map in each of the mapset directories listed in the user's current mapset search path in the order in which mapsets are listed there (see g.mapsets).

If the user does not enter parameter values but instead types only g.copy on the command line the program will prompt the user for a data type, the name of a file of this data type to copy, and the name of a new file to hold the copy. After both file names have been entered, the copy is created and the user is again prompted for a data element to be copied, until the user hits RETURN. When prompted for file names, the user may enter 'list' to see a list of existing files, or hit RETURN to end the file listing.

### Parameters:

3dview=from,to
  where from is an existing 3d options file, and to is the name given to the copy.
rast=from,to
  where from is an existing raster map layer to be copied, and to is the name given to the copy.
vect=from,to
  where from is an existing binary vector map layer to be copied, and to is the name given to the copy.
icon=from,to
  where from is an existing paint icon file to be copied, and to is the name given to the copy.
labels=from,to
  where from is an existing `/paint/labels` file to be copied, and to is the name given to the copy.
sites=from,to
  where from is an existing `site_lists` file to be copied, and to is the name given to the copy.
region=from,to
  where from is an existing region definition (windows) file to be copied, and to is the name given to the copy.
group=from,to
  where from is an existing imagery group file to be copied, and to is the name given to the copy.

## NOTE

If a file has support files (e.g., as do raster data files), these support files will also be copied.

## SEE ALSO

g.access
g.list
g.mapsets
g.remove
g.rename
parser

## AUTHOR

Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

Last changed: $Date: 2002/01/25 05:45:33 $