move-file

move-file


mono Index Level msg
Syntax move-file file.reference {file.name}
to: (file.reference {file.name}
Category TCL
Type Verb
Description moves a file descriptor from one dictionary to another. The dictionary may be file-level, account-level (master dictionary) or system-level (mds or system).

The verb requests the destination dictionary with the prompt 'TO:'. The following responses are allowed:

(dict.name
-or-
(dict.name file.name
-or-
file.name

If the "dict.name" is missing, the source file dictionary is assumed.

If the "file.name" is missing, the source "file.name" is assumed.

If both  the "dict.name" and the "file.name" are omitted, no action is taken.

"move-file" follows a hierarchical approach to file transfer. A file must be moved to the SAME LEVEL as it was created. That is, a data file to a data file, master dictionary to master dictionary, and so on.
Options
See Also create-file steal-file :swe (R83) :swx (R83) copy files delete-file :swd (R83) rename-file create-bfile (R83) file control block
Example move-file dict bp bp
to: old.bp

This effectively changes the name of the data-level d-pointer for the "bp" file to another item in the dict of bp called "old.bp". "old.bp" would subsequently be available using the reference "bp,old.bp". This also removes the "default" d-pointer to the "bp" file, and any reference to the "bp" data section would result in the message, "data level descriptor missing".

move-file md bp
to: old.bp

This changes the "bp" file to "old.bp". Note: this does NOT change the name of the data file within the dictionary of "bp".

move-file md bp
to:(archive,,

This moves the "bp" file from the current account to the "archive" account md.

move-file dict bp bp
to:(dict archive,bp,old.bp,

This moves the data portion of the "bp" file from the current account to the account called "archive", to a dictionary called "bp", and renames it "bp.old".

move-file mds,, pa
to:pete

This renames the account "pa" to "pete". Note: "rename-file" does not work at the mds ("system") level.
Warnings
Compatibility D3 7.0 AP
mono Index Level msg