6.10 Action - File Removal

The Action - File Removal dialog box lets you specify files or directories to remove from the device and the specific requirements that a device must meet for the action to be executed on the device.

To access this dialog box in ZENworks Control Center, click the Bundles tab. Click the underlined link of a bundle in the Name column of the Bundles list, click the Actions tab, click one of the action set tabs (Distribute, Install, Launch, Repair, Uninstall, Terminate, or Preboot), click the Add drop-down list, then select an available action.

You can use this action to perform an automated system cleanup. For example, you can specify that the c:\windows\Temp\Temporary Internet Files directory and all files matching c:\windows\Temp\*.log in are removed from the device.

On a Windows managed device, you cannot remove read-only files. If you specify a directory that contains several files (including some read-only files), the directory and the read-only files are not removed when the File Removal action runs. The files that are not read-only, however, are removed from the Windows device.

The following sections contains additional information:

6.10.1 General

The General page lets you specify files or directories to remove from the device.

Full Path to Source Files/Directories

Specify the full path to the file or directory that you want to remove, then click Add to add the file or directory to the list. You can use wildcard characters. If you use a mapped network drive to specify the path, you must select User from the Run Action As list.

Include System Files

Select this option to remove system files. If you specify a directory for removal that includes both system and non-system files, only non-system files are deleted, unless you specify this option.

Delete Folder Only if Empty

Select this option if you want to remove the specified folders only if they are empty.

When a File is Locked, Retry _ Times, Every _ Seconds

If a file is locked when the action is performed, the file cannot be removed. Select the check box and then specify the number of retry attempts and the time interval between attempts. By default, the action is retried 3 times with 5 seconds between each attempt.

Run Action As

On Windows, specify System (the default) or User from the Run Action As list. Specify System if removing files requires access to all areas of the device’s file system. If you use mapped network drives to specify files and directories, you must run the action as User, else the action fails because system users do not have access to user mapped drive.

On Linux, specify root (the default) or User from the list. Specify root only if the managed devices are run by the root user.

6.10.2 Requirements

The Requirements page lets you define specific requirements that a device must meet for the action to be enforced on it. For information about the requirements, see Requirements.