For the public: marked this as the answer since it's finalized, please review williamadowling'scomments and helpful resolutions to this issue.
------
In response to williamadowling: The action needed a "select all" before each "make clipping mask" action. Although "select all" existed earlier in the action, illustrator did not recognize that every layer was properly selected. I'm not great with javascript
Awesome! This works like a charm. Almost punched my computer when it all worked seamlessly.
Saved this as a .jsx and put it on a schedule, via the "System Scheduler" windows app to routinely run and sync with other processes.
Path to folder starts with a letter, single slash, then a double slash before each directory aside from the one immediately after letter drive.
I had no idea how to set this up. You helped a TON Willie Streeter. I liked and marked your comments as helpful. If there's any other way I can boost your rank, on here, let me know. Also, if there's a cool place to post this project or learn from others, in a more organized way than grinding through forums, let me know because I'd love to join.
Have a wonderful day, you're the bomb
-Andrew
------
FULL OUTLINED PROCESS, TO SHOW WHERE JSX FILE FITS INTO WORKFLOW:
(This is a little messy and over-exposed to errors. As a bare-bones, solely machine-executed process it works really well and has a cycle length of 12 hours. This process replaces a ton of labor)
Process begins via a REST API url that directs me to an ASP/AJAX REST API xml output page littered with API tags > xml file from that page is saved via wget cmd > jquery renders that xml on an html file > phantomjs renders jquery html page to txt file > TYPE cmd pulls cmd file > powershell script removes unnecessary lines in cmd file which caused it to error out > command file launches which simply does a "wget -nc -O" command that updates a local directory with print files > cmd file copies recent files to a temporary location [Folder("J:\PATH\\TO\\FOLDER");] > after copying new files to an isolated location the system scheduler launches this jsx file which runs through that location and saves to production folder > after the process is successfully completed the temporary art folder is emptied via cmd file > success.
-----------------------------------------------------------------------------
JSX TO RUN ACTION ON PREDEFINED FOLDER / JUST LIKE ACTIONS, BATCH PROCESS:
-----------------------------------------------------------------------------
/* Best if invoked via your OS command line- that's the purpose of this. It's basically just performing a batch operation. You can't run an action via system launch arguments or the command line so performing routine batch operations are difficult. Now you dont have to manually set up your batch operations every time. */
// uncomment to suppress Illustrator warning dialogs
// app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var destFolder, sourceFolder, files, fileType
sourceFolder = Folder("J:\PATH\\TO\\FOLDER");
//Alerts for troubleshooting folder and file setup (thanks to williamadowling on adobe forums )
//alert("sourceFolder.exists = " + sourceFolder.exists);
//alert("sourceFolder.fsName = " + sourceFolder.fsName);
//alert("sourceFolder contains " + sourceFolder.getFiles().length + " total files.");
//alert("sourceFolder contains " + sourceFolder.getFiles("*.pdf").length + " .pdf files.");
// If a valid folder is selected
if ( sourceFolder != null )
{
files = new Array();
//What kind of file in the source folder are you seeking?
fileType = "*.pdf";
// Get all files matching that file type
files = sourceFolder.getFiles( fileType );
if ( files.length > 0 )
{
for ( i = 0; i < files.length; i++ )
{
//Open a file
app.open(files)
{
//On that file, perform an action
app.doScript ("ACTION NAME", "ACTION SET/GROUP NAME")
}
}
alert( 'Complete' );
}
else
{
alert( 'No matching files found' );
}
}
Just an update for those who may try using the above code... to work as intended, I had to change the line: