User`s guide

11 Functions — Alphabetical List
11-162
listAutoAttachedFiles
List of files automatically attached to job, task, or parallel pool
Syntax
listAutoAttachedFiles(obj)
Description
listAutoAttachedFiles(obj) performs a dependency analysis on all the task
functions, or on the batch job script or function. Then it displays a list of the code files
that are already or going to be automatically attached to the job or task object obj.
If obj is a parallel pool, the output lists the files that have already been attached to the
parallel pool following an earlier dependency analysis. The dependency analysis runs
if a parfor or spmd block errors due to an undefined function. At that point any files,
functions, or scripts needed by the parfor or spmd block are attached if possible.
Examples
Automatically Attach Files via Cluster Profile
Employ a cluster profile to automatically attach code files to a job. Set the
AutoAttachFiles property for a job in the cluster’s profile. If this property value is
true, then all jobs you create on that cluster with this profile will have the necessary
code files automatically attached. This example assumes that the cluster profile
myAutoCluster has that setting.
Create batch job, applying your cluster.
obj = batch(myScript,'profile','myAutoCluster');
Verify attached files by viewing list.