Script fails with Failed to make directory
Posted: Tue Nov 28, 2017 10:55 pm
Hi, we're not sure where this error lies, but seems to be a write permission. We have tried running with our network administrators account and with our switch account (which is already an administrator)
In all cases we receive the error
The script is attempting to write to the local disk as we thought the error was when we were trying to write to the job server, but the error still occurs when writing to our local C drive.
In all cases we receive the error
Code: Select all
29/11/2017 8:45:24 AM,Error,SwitchScript1,test write,Script element,,,Error in line 16 of script : Error. Failed to make directory 'testtest'
Code: Select all
// Is invoked each time a new job arrives in one of the input folders for the flow element.
// The newly arrived job is passed as the second parameter.
function jobArrived( s : Switch, job : Job )
{
s.log(3,"jobArrived test write triggered");
var dir = new Dir("C:\JOBS\J000029\Client\PDF");
dir.mkdir("testtest");
}
// Is invoked at regular intervals regardless of whether a new job arrived or not.
// The interval can be modified with s.setTimerInterval().
function timerFired( s : Switch )
{
s.log(3,"timerFired test write triggered");
var dir = new Dir("C:\JOBS\J000029\Client\PDF");
dir.mkdir("testtest");
}