Overview (REPOSITORY COPY command)
The REPOSITORY COPY
command allows you to copy an arbitrary file from the local file
system to a IBM® SPSS® Collaboration and Deployment Services Repository or to copy a file from a IBM SPSS Collaboration and Deployment Services Repository to the local file system.
- When copying to a IBM SPSS Collaboration and Deployment Services Repository,
use the
REPOSITORY ATTRIBUTES
command--followingREPOSITORY COPY
--to specify properties such as a description, keywords, and security settings for the object.
Basic Specification
The only specification is the FILE
keyword, which specifies the source file, and the OUTFILE
keyword, which specifies the target
location. Each keyword can specify a location in the local file system
or a location in the current IBM SPSS Collaboration and Deployment Services Repository.
File Specifications for IBM SPSS Collaboration and Deployment Services Repository Objects
- The form of the file specification for
an object in a IBM SPSS Collaboration and Deployment Services Repository is the scheme name
SPSSCR
, followed by a colon, either one or two slashes (forward or backward), and a file path, all enclosed in quotes. For example:'SPSSCR://scripts/myscript.py'
- Paths can be specified with forward slashes (/) or backslashes (\).
- You can define a file handle to a file or a directory in a IBM SPSS Collaboration and Deployment Services Repository and use that handle in file specifications for IBM SPSS Collaboration and Deployment Services Repository objects.
- You
can use the
CD
command to set the working directory to a directory in the currently connected IBM SPSS Collaboration and Deployment Services Repository, allowing you to use relative paths in file specifications for IBM SPSS Collaboration and Deployment Services Repository objects.
- File extensions are not added to files stored to a IBM SPSS Collaboration and Deployment Services Repository. Files are stored to a IBM SPSS Collaboration and Deployment Services Repository with an automatically determined MIME type that describes the type of file. Including a file extension is not necessary but is recommended.
- When copying a file from a IBM SPSS Collaboration and Deployment Services Repository you must specify the filename exactly as provided when the file was stored. If the file was stored with an extension, then you must supply the extension. If the file was stored without an extension then do not include one.
- When copying from a IBM SPSS Collaboration and Deployment Services Repository, the latest version of the specified object that
is accessible to the current user is retrieved. To specify a version
by label, use
SPSSCR://<path>#L.<label>
. To specify a version by the version marker (consists of an integer version number followed by a time stamp that uniquely specifies a version), useSPSSCR://<path>#M.<version marker>
. See the topic File Specifications for IBM SPSS Collaboration and Deployment Services Repository Objects for more information.
Operations
-
REPOSITORY COPY
will fail if a IBM SPSS Collaboration and Deployment Services Repository location is specified (for eitherFILE
orOUTFILE
) and there is no connection to a IBM SPSS Collaboration and Deployment Services Repository. Connections are established with theREPOSITORY CONNECT
command. - Specifying an existing IBM SPSS Collaboration and Deployment Services Repository file on the
OUTFILE
keyword results in a new version of the file, as opposed to overwriting the latest version.
- The
PERMISSIONS
,SAVE
, andXSAVE
commands will generate errors if you attempt to set permissions for IBM SPSS Collaboration and Deployment Services Repository objects. Permissions for IBM SPSS Collaboration and Deployment Services Repository objects are set with theREPOSITORY ATTRIBUTES
command or using administration tools included with IBM SPSS Collaboration and Deployment Services.
- The
ERASE FILE
command will generate an error if you attempt to delete a IBM SPSS Collaboration and Deployment Services Repository object.