Document revision date: 10 November 2000

## Using DECwindows Motif for OpenVMS

Previous | Contents | Index

### 6.3.10 Deleting Files

By using the Delete command to delete the files you no longer need, you make room on your disk for other files.

You can also delete a subdirectory if it does not contain files. See Section 6.6.2 for more information.

To delete one or more files:

1. Select the files you want to delete.
2. Choose the ellipsis (...) next to the Delete command on the Commands menu.
   FileView displays a dialog box.

3. To perform a simple delete operation, click on OK.
   To alter the way a delete operation is performed, choose any of the following options and click on OK:

   Enable this option | To
   --- | ---
   Show Log | Display the file specification of each file as it is deleted.
   Request Confirmation | Display a prompt asking whether to delete the file.
   Erase Storage | Erase the selected files from your disk so that the deleted data no longer physically exists.

If your file list does not include version numbers and you select a file for deletion, FileView deletes all versions of the file.

To use wildcards in the file specifications of the files you want deleted, choose the Delete command without first selecting any files. In the following example, choosing the Delete command and entering the file specifications as shown deletes all versions of the files FORECAST1.DDIF, FORECAST2.DDIF, and FORECAST3.DDIF. The second and third file specifications use the file type of the first input file. Note, however, that some form of version number (here specified as wildcards) must be included in each file specification.

    Files: FORECAST1.DDIF;*,FORECAST2;*,FORECAST3;*

### 6.3.11 Protecting Files

To protect one or more files from being accessed by other users:

1. Select the files you want to protect.
2. Choose the ellipsis next to the Protection command on the Commands menu.
   FileView displays a dialog box.

3. Set and clear the check buttons in the Protection dialog box to change the file protection on the selected files.

### 6.3.12 Printing Files

To send one or more files to a printer:

1. Select the files you want to print.
2. Choose the ellipsis (...) next to Print command on the Commands menu.
   FileView displays a dialog box.

3. To print the selected file on SYS$PRINT, your default system printer, click on OK.
   To alter the way a print operation is performed, choose the Show Queue Options button and click on OK. FileView displays another print dialog box in which you can provide additional information about how you want to print your file. This information might include the print queue to which you want to send your file and how many copies you want to print. See Section 4.4.1 in Chapter 4 for a detailed description of these additional print options.
4. If the Work in Progress dialog box is open, FileView reports that your print job has been sent to the printer. Session Manager displays a message when your job is printed.

To use wildcards in the file specifications of the files you want to print, choose the Print command without first selecting any files. In the following example, choosing the Print command and entering the file specifications as shown submits the files DIRECTIONS.TXT and CURRENCY.TXT and the highest versions of all files with file type COM as a single print job:

    Files: DIRECTIONS.TXT,CURRENCY,*.COM

For more information about printing files, see Chapter 4.

### 6.3.13 Running Programs

You can use the Run command to run a program or to invoke a DCL command file. A program usually has an EXE file type. A DCL command file has a COM file type.

To run a program:

1. Select the file you want to run.
2. Choose the ellipsis (...) next to the Run command on the Commands menu.
   FileView displays a dialog box.

3. To run a file, click on OK. If you want to add a parameter to the RUN command, type the parameter in the text entry box provided. If the file you want to run is a DCL command file, these parameters are passed to it.
   To alter the way a file is run, choose any of the following options and click on OK:

   Enable this option | To
   --- | ---
   Parameters | Add any parameter to the Run command. Type the parameter in the text entry box provided. If the file you want to run is a DCL command file, these parameters are passed to it.
   Debug | Run the program under the control of VAX Debugger. To run an image without the debugger that has been linked with DEBUG, be sure this button is disabled.

4. Click on OK.

If the Work in Progress dialog box is displayed, it reports that the file is being run.

In the following example, choosing the Run command and entering the file specification as shown executes the program MORTGAGE.EXE:

    Files: [.SCHEDULES]MORTGAGE.EXE

## 6.4 Opening a New View

You can open a new FileView window that maintains the file and directory context of the current FileView window. When you choose New View... from FileView's File menu, FileView copies the display from the current FileView window into the new window and updates it, leaving the current FileView window in its original state. Any changes you make to the current FileView window (such as deleting a file or changing the information in the File Filter entry box) without applying them are reflected in the new FileView window.

You can also open a new FileView window that reflects changes you make to the File Filter or Directory entry boxes in the current FileView display. To open a new FileView window:

1. Edit the File Filter or Directory entry box to reflect the information you want to display in the new FileView window.
2. Choose New View... from the File menu.
3. Do not click on the Apply button.

A new FileView window is opened that reflects the new file and directory information you specified. The File Filter and Directory entry boxes in the current FileView window are reset to the original text.

## 6.5 Accessing Files and Applications Quickly

FileView gives you two shortcuts to access files and applications quickly: pop-up menus and double-click commands.

### 6.5.1 Using Pop-Up Menus to Execute Commands

You probably execute the same few commands on a specific type of file. For example, you might edit, type, or copy a TXT file, but you would never run it. To help you perform file tasks more quickly, each file type has a corresponding pop-up menu that contains the commands you are most likely to use on that kind of file.

To see the contents of a pop-up menu for a specific file type, press and hold MB3 on a file name in your file list. Choose the command you want to execute on that file. The next time you display this pop-up menu, the command you last chose will be positioned under the pointer.

If you don't like the pop-up menu that is defined for a specific file type, you can change it. See Chapter 9 for information about customizing pop-up menus.

### 6.5.2 Using Double-Click Commands

FileView executes a predefined command when you double click on some types of files. By using double-click commands, you can start file tasks quickly. For example, double clicking on a CARD file opens Cardfiler. Double clicking on an EXE file runs that program.

To see the double-click command defined for a specific file type:

1. Choose File Types... from the Options menu.
   FileView displays the File Types dialog box, which is described in detail in Chapter 9.
2. Click on a file type in the File Types list box.
   The double-click command defined for that file type is displayed below the File Types list box.

If you don't like the double-click command that is defined for a specific file type, you can change it. See Chapter 9 for information about changing a double-click command definition.

## 6.6 Working with Directories

To access files on your system, you need to work with and navigate the directory structure. You might also need to work with devices other than your default device.

You can access your own and other directory structures that have been set up to allow public access. With the correct process privileges, you can access files and directories on other devices or nodes. Your privilege classification controls what commands and functions you are authorized to execute from your account. For more information about setting process privileges, see Chapter 5.

With FileView you can perform the following device and directory operations:

- Create a directory
- Delete a directory
- Change directories
- Change devices
- Search a directory structure with wildcards

### 6.6.1 Creating a Directory

You can do all your work---including using files and running applications---in your top-level directory and never move from it. However, by creating and using subdirectories, you can organize your files into groups.

If you have the SYSPRV privilege, you can also create a top-level directory. See Section 5.5 for more information.

To create a directory:

1. Choose Create Directory from the Utilities menu.
   FileView displays a dialog box.

2. Type the name of the directory you want to create.
   For example, to create a subdirectory from the top-level directory [JONES] with the directory specification [JONES.TRAVEL], type TRAVEL. To create a subdirectory from [JONES] with the directory specification [JONES.TRAVEL.MILEAGE], type TRAVEL.MILEAGE.
3. Click on OK.

### 6.6.2 Deleting a Subdirectory

Before you attempt to delete a subdirectory file, you must confirm that it contains no files. Select the subdirectory from the subdirectory list. If the subdirectory contains files, delete them. To delete the empty subdirectory file:

1. In the subdirectory list, move up one level in the directory structure.
2. Select the subdirectory file you want to delete from the file list.
   The subdirectory file has a file type of DIR.
3. Choose Delete from the Commands menu.
   FileView displays the dialog box described in Section 6.3.10.
4. Click on OK.
   If the subdirectory is empty, FileView displays another dialog box that asks you to confirm that you want to delete the subdirectory file.
5. Click on OK.

### 6.6.3 Navigating a Directory Structure

If you have subdirectories, FileView displays a subdirectory list that lets you move up and down your directory structure to access your subdirectories and the files they contain. By setting default to another directory, you change your current directory.

FileView appends the subdirectory name to the directory name in the Directory entry box and displays the contents of that subdirectory in the current file list.

If you have subdirectories in your new default directory, they are now displayed in the subdirectory list. The subdirectories that were previously displayed are displayed in a sibling directory list to the left of the subdirectory list.

### 6.6.4 Using Wildcards in the File Filter

From any point in a directory structure, you can search a subdirectory in that structure or another directory by using the ellipsis (...) or hyphen (-) wildcard character.

You do not have to change directories to search the contents of another directory. By entering a full file specification (including a directory and device name, if appropriate) in the File Filter entry box, you can search the contents of that directory without changing directories. Any output produced by a FileView command continues to be directed to your current directory.

#### 6.6.4.1 Using the Ellipsis (...) Wildcard

Use the ellipsis wildcard to search down the directory structure. You can list the contents of directories or search for one file in a directory. Using the ellipsis wildcard allows you to conduct a broad search of an entire directory structure.

The following example shows how to use the ellipsis to list the contents of the subdirectories under [JONES]. Notice that the current directory is not changed.

    File Filter: [JONES...]
    Directory: $USERS:[JONES.STAFF]

The following example lists the latest versions of all files named DIRECTIONS.TXT in [JONES] and all subdirectories under [JONES]:

    File Filter: [JONES...]DIRECTIONS.TXT
    Directory: $USERS:[JONES.STAFF]

If you begin the directory specification with an ellipsis, the search begins from the current directory. This example searches all subdirectories under [JONES] named PROJECT and lists the latest versions of all files named SALARIES.LIS:

    File Filter: [...PROJECT]SALARIES.LIS
    Directory: $USERS:[JONES]

In the following example, the current directory is [JONES]. This example searches [JONES] and all subdirectories under [JONES] and lists the latest versions of all files named HOLIDAYS.LIS:

    File Filter: [...]HOLIDAYS.LIS
    Directory: $USERS:[JONES]

However, if you begin the directory specification with a period, only the subdirectory that is one level lower in the directory structure than the current directory is searched. In the following example, the current directory is [JONES]. This example searches only the [JONES.LETTERS] subdirectory for the file OFFER.TXT, and not [JONES.STAFF.LETTERS]:

    File Filter: [.LETTERS]OFFER.TXT
    Directory: $USERS:[JONES]

To search all top-level directories and their subdirectories from wherever you are in the directory structure, use the asterisk (*) wildcard followed by an ellipsis. The following example (which might require READALL or BYPASS privilege) searches all the directories and subdirectories on the device except for the master file directory (MFD). Note that this search might take a long time if you search the directory structure on a large device.

    File Filter: [*...]
    Directory: $USERS:[JONES]

#### 6.6.4.2 Using the Hyphen (-) Wildcard

When you learned how to navigate a directory structure, you saw how to use the hyphen wildcard to move up the directory structure one level at a time. By using the hyphen wildcard in a file specification in the File Filter entry box, you can list the contents of a directory or search for a file within a directory structure. Each hyphen refers to the directory one level up from the current one. You can follow the hyphens with directory and subdirectory names to move up and down the directory structure on another path.

Unlike the ellipsis wildcard, the hyphen wildcard limits your search to one level of the directory structure at a time.

The following example lists the contents of $USERS:[JONES] while the current directory remains [JONES.STAFF]:

    File Filter: [-]
    Directory: $USERS:[JONES.STAFF]

In the following example, the current directory is[JONES.SCHEDULES]. This example lists the latest version of FUNDING.TXT in [JONES.STAFF]:

    File Filter: [-.STAFF]FUNDING.TXT
    Directory: $USERS:[JONES.SCHEDULES]

You can specify more than one hyphen. The following example displays the contents of the directory [JONES], which is two levels up in the directory hierarchy, while the current directory remains [JONES.SCHEDULES.CURRENT]:

    File Filter: [--]
    Directory: $USERS:[JONES.SCHEDULES.CURRENT]

If you enter so many hyphens that you point above the master file directory (MFD), FileView displays an error message.

## 6.7 Executing a DCL Command

You can execute a DCL command directly from FileView by choosing DCL Command from the Utilities menu. FileView opens a DCL Command window and displays the DCL prompt ($). Any DCL command you enter is executed in the context of the current directory.

To close the DCL Command window temporarily, shrink the window to an icon by clicking MB1 on the window's minimize button. By continuing to choose DCL Command from FileView's Utilities menu, you create additional Task Output windows that you can close and reopen.

Previous | Next | Contents | Index

| privacy and legal statement |
5633PRO_005.HTML