Working with Directories and Files [ HP Resource Sharing for MPE/iX ] MPE/iX 5.0 Documentation
HP Resource Sharing for MPE/iX
Working with Directories and Files
DISCMGR provides several commands that let you work with the files and
subdirectories on a shared disc in much the same way as you work with DOS
files on a PC. Most of these commands are similar to DOS commands, and
provide a means to examine, delete, rename, and move files and
subdirectories.
To examine a list of files and subdirectories:
1. Run DISCMGR and make sure that you are connected to the shared
disc you want to use.
2. Switch to the shared disc drive.
For example, if you want to list the files in the shared disc
called JOE and you have established a connection to JOE by the
drive letter J:, enter:
J:
3. Enter DIR. All files and subdirectories on that shared disc are
listed on the screen.
* To pause the display after the first screen full of files,
enter DIR /P.
* To list the files in columns across the screen, enter DIR
/W.
* To list the files on a printer, type DIR > device, where
device is a valid MPE device class name. For example, to
direct the DIR list to the LP device, you might enter:
DIR > LP
You can also redirect the output by designating a file equation
before you enter the DIR command. For example, to redirect the
output to a file called MYOUT, enter the following:
:FILE MYOUT;DEV=LP
DIR > *MYOUT
Keep in mind you can use DOS wildcards to list specific files.
For example, if you want to list all files with an extension of
.BAK, enter:
DIR *.BAK
4. To list all files that start with M, enter:
DIR M*
NOTE Remember, you do not need to change to the shared disc in order to
enter the DIR or other DISCMGR commands. Instead, you can include
the drive letter in the command. For example, at the DISCMGR>
prompt, you could enter:
DIR J:
This would list the files and subdirectories of the J: shared disc.
To list the contents of a file:
1. Run DISCMGR.
2. Connect to the shared disc containing the file you want to
examine.
3. Enter the following command:
TYPE [dospath\]filename
The contents of the file are listed on the screen. To pause the
display, press CTRLS. To continue the display, press CTRLQ. To
cancel the display, press CTRLY.
For example, to examine the contents of the file SALERPT in the
shared disc subdirectory SALES on the current drive, you would
enter:
TYPE SALES\SALERPT
To delete a shared disc file:
1. Run DISCMGR.
2. Connect to the shared disc containing the file you want to delete.
3. Enter the following command:
DEL filename
For example, to delete the file REPORT on your shared disc, enter:
DEL REPORT
If the file was in the SALES subdirectory, you would enter:
DEL \SALES\REPORT
To rename a file on the shared disc:
1. Run DISCMGR.
2. Connect to the shared disc containing the file you want to rename.
3. Enter the following command:
RENAME filename newfilename
For example, to rename the file REPORT to JUNERPT, enter:
RENAME REPORT JUNERPT
If the file REPORT was in the ADMIN subdirectory, you would enter:
RENAME \ADMIN\REPORT JUNERPT
Managing Shared Disc Subdirectories
Several DISCMGR commands are available to help you manage the
subdirectories on your shared disc.
Remember, you can enter these commands at the DISCMGR> prompt or at the
drive letter prompt (DISCMGR J:\>). If you have not changed to the drive
letter, you must include it in the command (for example, DIR J:).
To create a subdirectory on your shared disc:
1. Run DISCMGR.
2. Connect to the shared disc in which you want to create a
subdirectory.
3. If you want to create a subdirectory within another subdirectory,
go to the subdirectory in which you want to create a new
subdirectory. For example, if you want to create SUBDIR2 in
SUBDIR1, you would use the CHDIR command to go to SUBDIR1.
4. Enter the following command:
MKDIR subdirectory
For example, to create the subdirectory ADMIN, enter:
MKDIR ADMIN
To change to a different subdirectory:
1. Run DISCMGR.
2. Connect to the shared disc containing the subdirectory where you
want to go.
3. Enter the following command:
CHDIR directoryname
For example, to change from the subdirectory SALES to the
subdirectory OFFICE, at the DISCMGR J:\SALES> prompt enter:
CHDIR OFFICE
To go to the root directory:
CHDIR\
To go back one level of subdirectories:
CHDIR ..
For example, if you are in the subdirectory DEPT, which is in the
subdirectory SALES on the JOE shared disc, the prompt would be:
DISCMGR J:\SALES\DEPT>
To return to the SALES subdirectory, you would enter:
CHDIR ..
The prompt would now be:
DISCMGR J:\SALES>
To rename a subdirectory:
1. Run DISCMGR.
2. Connect to the shared disc containing the subdirectory you want to
rename.
3. Enter the following command:
RENDIR directoryname newname
For example, to rename the ADMIN directory to OFFICE, enter:
RENDIR ADMIN OFFICE
To remove a subdirectory:
1. Run DISCMGR.
2. Connect to the shared disc containing the subdirectory you want to
remove.
3. Delete all files in the subdirectory.
4. Enter the following command:
RMDIR directoryname
For example, to remove the directory OFFICE, enter:
RMDIR OFFICE
NOTE You cannot remove the current subdirectory or the root directory.
MPE/iX 5.0 Documentation