tcl.move-file
Moves file.
Syntax
move-file file.reference {file.name} to: (file.reference {file.name}
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 dictioanry 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.
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.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
