External File Copy using Javascript
Posted: Tue Feb 11, 2020 11:55 pm
I'm working on a script to move an external file from one directory to another.
I can't seem to get it to work. I've reduced the script to this and still no luck.
function jobArrived( s : Switch, job : Job )
{
var SourceFile = "//SPCV02/testing/FromFolder/FileToMove.txt";
var DestinationFile = "//SPCV02/testing/ToFolder/FileToMove.txt";
s.copy( SourceFile , DestinationFile );
// And move the job to the single output connection
job.sendToSingle( job.getPath() );
}
I can't seem to get it to work. I've reduced the script to this and still no luck.
function jobArrived( s : Switch, job : Job )
{
var SourceFile = "//SPCV02/testing/FromFolder/FileToMove.txt";
var DestinationFile = "//SPCV02/testing/ToFolder/FileToMove.txt";
s.copy( SourceFile , DestinationFile );
// And move the job to the single output connection
job.sendToSingle( job.getPath() );
}