|
|
Task Reference: HP 3000 Series 9X8LX Computer Systems > Chapter 2 Performing Tasks Using MPE/iX CommandsWorking with Files |
|
You often need to move files from one environment to another to be shared by other programs, other users, and other systems. You need to have an easy method of transferring files while retaining a level of security against unauthorized access. The creator of a file has control over who else can access it. The following procedures provide instructions for copying files and for maintaining file security. To make a duplicate copy of a file in your own group or account, use the COPY command. Provide the name of the file that you are copying from (the source file) and the name of the file that you are copying to (the target file), separating the two with a semicolon (;). Provide a unique file name for the target file as the COPY command will write over any existing file with the same name. To copy a file use the COPY command:
The following example duplicates the file MYFILE by creating a new file called NEWFILE:
This example assumes that the name provided after the TO= parameter is unique. To copy over an existing file, use the COPY command:
If you are copying a file to a file name that already exists on the system, the COPY command displays the following prompt:
A YES or Y response overwrites (purges) the existing file. A NO or N response terminates the COPY command without copying the file. To ensure that the COPY command does not copy the file over a previously existing file, use the NO parameter.
The following example prevents the copy of the file STATUS91 over an existing file, STATUS91. There will be no prompt asking you to purge the existing (old) file.
The message "NO COPY WAS DONE." (CIERR 9113) assures you that your old file, STATUS91, was not overwritten. To change the name of a file, use the RENAME command. Enter the command and the current file name, followed by the new file name. You must be the creator of the file in order to perform this task.
The following example renames a file MYFILE1 to MYFILE2:
To delete unwanted files use the PURGE command. Enter the PURGE command and the file name:
To delete an unwanted file that you have not created. Enter the PURGE command from an account with SM or AM capability:
To delete a directory and the files or directories it contains using wildcards, use the PURGEDIR command, for example: :purgedir /MYACCT/MYGRP/@ This example deletes all directories rooted to /MYACCT/MYGRP. To delete all empty directories under the CWD (Current Working Directory) with TMP in their name: :purgedir @TMP@ To delete all directories under the CWD with names beginning with TMP, and all objects below these directories: :purgedir TMP@; TREE To delete all directories under the CWD with names ending with TMP, and all objects below these directories: :purgedir ./@TMP
|
|