Creating and Populating Folders

One of the things an administrator will commonly wish to do is to to create and populate new folders for a user. The process is straightforward and can be automated using REXX programs. Several examples are provided below. The REXX commands used are explained in Using REXX in OS/2 V2.0.

The process involves:

  • Creating a folder, which in turn will create a directory within the desktop structure

  • Copying data files into it (optional)

  • Creating new program objects within it.

    For example, if you wanted to create a new folder on the desktop and call it MyFolder, use the procedure in Figure "REXX Procedure to Create a New Folder."

    To add an editor to the folder, MyFolder, that was just created, use the procedure in Figure "REXX Procedure to Add a Program to a Folder."

    The above examples show how to add instances of existing classes (Folder and Program), but you may also want to add new classes which you have created. You must first register a class with WPS before you can create an instance of it.

    The example below shows how to register a Password folder. The design and coding of this folder is described in OS/2 Version 2.0 - Volume 4: Application Development. To register this new folder class, use the procedure in Figure "REXX Procedure to Register a New WPS Class."

    To "deregister" the class when you want to remove it from the WPS classes, use the procedure in Figure "REXX Procedure to Deregister a WPS Class."


    [Back: Limiting a User's Access to Settings]
    [Next: Adding New File Types]