This is a shot in the dark, but assuming I am understanding the behavior described in Issue #541 correctly, and the working directory is the script directory when running, you could try
cp ../*/file.plist "/Library/folder/"
This means go up one directory (
../) and then within any of those subdirectories (
*), copy any files named
file.plist to the specified location.
There are other unknowns here though. Does MDS delete the script files immediately after they have been executed? If so,
file.plist may no longer exist by the time your script runs. If the files are not deleted immediately, you would also need to be sure that your file.plist “script” is set to run before the script that is expecting that file to exist, which I believe can be done by setting the order in the Scripts popover in MDS.
Seems like it may be valuable for MDS to add an option to copy resources to a defined location that scripts can reference with a variable set by MDS.
Also, I am making guesses and assumptions here without any testing or certainty of how MDS is copying these files. Sorry if I’m way off here.