In order to change a certain object's setting with REXX, use the following RexxUtil function:
rc = SysSetObjectData(<name>, <setup>)

with:

<name> being the object you wish to change (referenced either by a full path specification or an object ID, such as <WP_DESKTOP>);

<setup> being one of the WPS setup strings, which always have a <keyword>=<data> syntax. You can combine several settings by separating them with semicola (";").

Example:

  if SysSetObjectData(directory(),"NOMOVE=YES;DEFAULTVIEW=ICON") then
    Say "Settings changed!"

This will change the folder settings for the current directory, which is useful for scripts called by XFolder, which have the intended directory already changed to.

See the OS/2 REXX Reference for details.

The list below describes all the setup strings for the WPObject class, plus additional strings supported by the WPFolder class. (In short, you may use any of the following strings on folders.) The list is sorted alphabetically.

ALWAYSSORT={YES|NO}
Set whether folder sort order is always maintained. Opening and adding an object to a folder may take longer if the sort order is being maintained.

Note: XFolder overrides this setting string if you have the extended sort functions enabled. See "XFolder setup strings" for the changes with respect to this setting.

BACKGROUND=<name>,<mode>,<factor>,<bgtype>,<bgcol>
This sets the folder background, where:

<name> = Image file name. This name must be the fully qualified path of the image file. "?:\" is permitted to indicate the boot drive.

<mode> = Image mode. This mode can be one of the following:
N = Normal image
T = Tiled image
S = Scaled image

<factor> = Scaling factor.

<bgtype> = Background type. This can be one of the following:
I = Image
C = Color only

<bgcol> = Background color. This color can be 3 numbers representing RGB values or the default, in the following format: {R-value G-value B-value}

Example: BACKGROUND=C:\OS2\BITMAP\OS2LOGO.BMP,S,3,I or BACKGROUND=(none),,,C,0 128 128

CCVIEW=DEFAULT
Uses the default value of the concurrent view setting of the system, when the user selects open. This is the default value.

CCVIEW=YES
Creates new views of the object every time the user selects open.

CCVIEW=NO
Resurfaces open views of object, when the user selects open.

DEFAULTVIEW=DEFAULT
Sets the default open view to what was specified in the OS/2 System object. This is the default value.

DEFAULTVIEW={SETTINGS|ICON|TREE|DETAILS}
Sets the default open view to the specified folder view.

DETAILSCLASS=<classname>
This sets the object class for which the details are displayed in details view. The default object class is WPFileSystem. You better not mess with this one.

DETAILSFONT=<size>.<facename>
Change the font used for a details view. For example: 9.WarpSans Bold. The default value is 8.Helv (on Warp 3)

DETAILSSHADOWCOLOR=<color> (Warp 4 only)
Text color for a shadow object in the Details View. <color> may be standard color name or an r g b set of numbers.

DETAILSTEXTCOLOR=<color> (Warp 4 only)
Text color for normal objects in the Details View. <color> may may be standard color name or an r g b set of numbers.

DETAILSVIEW=<style>
This set details view to the specified style. Possible values are:
MINI small icon; this is the default.
NORMAL normal-size icon.

HELPLIBRARY=<filename>
Sets the help library.

HELPPANEL=<id>
Sets the object's default help panel within the help library. You better not mess with these settings, for you have to know the WPS internal help resource IDs.

HIDEBUTTON={YES|NO}
Determine whether views of this object have a hide button as opposed to a minimize button. The default is the current system Button appearance for windows setting. This cannot be specified here.

ICONFILE=<filename>
Sets the folder's closed icon. <filename> must be a ".ICO" file.

ICONFONT=<size>.<facename>
Setup string used to change the font used for an icon view. For example: 10.Helv

ICONNFILE=<index>,<filename>
This sets the file name of the animation (open folder) icon. The <index> value must be set to 1. The specified file (".ICO") contains the folder's open folder icon.

ICONNRESOURCE=<index>,<id>,<modname>
Sets the animation (open folder) icon to data residing in a resource file. The <index> value must be set to 1. The <id> is the identity of an icon resource in the <module> dynamic link library (DLL). The specified resource is the folder's open folder icon.

ICONPOS=<x>,<y>
Sets the folder's initial icon position in the parent folder. The x and y values represent the position in the folder in percentage coordinates.

ICONRESOURCE=<id>,<modname>
Sets the object's icon to data residing in a resource file. The <id> is the icon resource ID in the dynamic link library (DLL) <module>.

ICONSHADOWCOLOR=<color> (Warp 4 only)
Text color for shadow icons in the Icons View. <color> may be a standard color name or an r g b set of numbers.

ICONTEXTBACKGROUNDCOLOR=<color> (Warp 4 only)
Background color for normal text in the Icons, Tree and Details View. <color> may be a standard color name or an r g b set of numbers.

ICONTEXTCOLOR=<color> (Warp 4 only)
Text color for normal icons in the Icons View. <color> may be a standard color name or an r g b set of numbers.

ICONTEXTVISIBLE={YES|NO}
The names of objects contained in a folder are displayed or not displayed in the Icon View.

ICONVIEW=<style1>[,<style2>...]
This sets icon view to the specified styles. Possible values are: FLOWED NOGRID INVISIBLE NONFLOWED MINI NORMAL
The default value is NOGRID,NORMAL
These settings correspond to the "Icon view" page in a folder's settings notebook.

ICONVIEWPOS=<x>,<y>,<cx>,<cy>
This sets the initial icon view position and size of the folder on the screen. These values are percentages (0-100) of the screen size.

LOCKEDINPLACE={YES|NO} (Warp 4 only)
This object is fixed or not fixed in position.

MENUBAR={YES|NO} (Warp 4 only)
The menubar of the folder is displayed or not displayed.

MENUITEMSELECTED <menu-item-id> (Warp 4 only)
Simulates selecting the specified menu item from the object's popup menu. <menu-item-id> must be a numeric value.
You may obtain the <menu-item-id> with the XRAY tool which is available on the Internet. Or look on the respectivve "WPS Menu IDs" page (Hey, this setting works for XFolder menu items also, BTW.)
This is not really a "setting", but rather a command to be performed on the folder.

MENUS={SHORT|LONG} (Warp 4 only)
Determine whether this objects has a short popup menu (without menu entries that duplicate drag 'n' drop functions) or the full one.

MINWIN={HIDE|VIEWER|DESKTOP}
Determine whether the minimized folder will be hidden, placed into the Minimized Windows View, or minimized to the desktop.
The default is the current Minimize button setting. This cannot be specified here.

NOCOPY={YES|NO}
The folder cannot be copied.

NODELETE={YES|NO}
The folder cannot be deleted. Be careful with this one.

NODRAG={YES|NO}
The folder cannot be dragged with the mouse.

NODROP={YES|NO}
The folder will not accept any objects dropped upon it.

NOLINK={YES|NO}
No shadows can be created of this folder.

NOMOVE={YES|NO}
The folder cannot be moved.

NOPRINT={YES|NO}
The folder cannot be printed. This is default value. Why would you want to print a folder?

NORENAME={YES|NO}
The folder cannot be renamed.

NOSETTINGS={YES|NO}
The folder's settings notebook cannot be opened.

NOSHADOW={YES|NO}
same as NOLINK.

NOTVISIBLE={YES|NO}
The folder is not visible. Be careful with this style, since you might not be able to get the folder back.

OBJECTID=<<name>>
Sets a persistent ID for the object. An Object ID is any unique string preceded with a < and terminated with a >.
Object IDs are useful for identifying objects without knowing their exact location on the user's desktop. For example, the desktop always has the ID <WP_DESKTOP> on every system; the XFolder Configuration folder is assigned an ID of <XFOLDER_CONFIG>, so that XFolder finds it even though you might have moved it to a different location. See the "WPS Object IDs" page for a listing of system IDs.

Object IDs are even neccessary to be able to locate abstract WPS objects (e.g. shadows or program objects) from REXX, since these objects do not appear in the file system. So if you create an abstract object from REXX and wish to be able to open it from REXX also, you must assign it an Object ID.

The default is to not have an ID.

OPEN={SETTINGS|DEFAULT|ICON|TREE|DETAILS}
Open a view now. This is the clever trick used by a zillion REXX scripts on the Internet to open a folder from the OS/2 command line.
OPEN=DEFAULT will open the default view of the folder (as if you had double-clicked on it).
This is not really a "setting", but rather a command to be performed on the folder. It will open immediately.

REMOVEFONTS={YES|NO}
This can remove all instance fonts from the folder, i.e. the ones that apply to this folder only (specified by the respective object settings strings or in the folder Settings notebook). Default is NO.
This is not really a "setting", but rather a command to be performed on the folder.

SHOWALLINTREEVIEW={YES|NO} (Warp 4 only)
Show all objects in an open Tree View or only folders.

SORTCLASS=<classname>
This sets the class object to sort by. The default class object is WPFileSystem.

TEMPLATE={YES|NO}
Determines whether this folder is a template or not. Default is NO (of course).

TITLE=<title>
Sets the object's title to something new. This will also change the "real" filename, just as if you had changed the title from the WPS.

TREEFONT=<size>.<facename>
Setup string used to change the font used for an Tree view. For example: 10.Helv

TREESHADOWCOLOR=<color> (Warp 4 only)
Text color for shadow icons in the Tree View. <color> may be a standard color name or an r g b set of numbers.

TREETEXTCOLOR=<color> (Warp 4 only)
Text color for normal icons in the Tree View. <color> may be a standard color name or an r g b set of numbers.

TREETEXTVISIBLE={YES|NO} (Warp 4 only)
The names of the objects contained in a folder are displayed or not dispalyed in Tree View.

TREEVIEW=<style1>[,<style2>...]
This sets the tree view to the specified styles. Possible values are: INVISIBLE LINES MINI NOLINES NORMAL
The default value is LINES, NORMAL
These settings correspond to the "Tree view" page in a folder's settings notebook.

WORKAREA={YES|NO}
This sets the folder so it is a workarea. Default is NO.