Page 1 of 1

Copy files (job) into some directiory (Windows)

Posted: Mon Sep 15, 2014 9:30 pm
by dkelly
Why not use the built-in copy function?



s.copy(srcPath, dstPath);



Copy files (job) into some directiory (Windows)

Posted: Mon Sep 15, 2014 9:35 pm
by dkelly
Or try this



var CopyCommand = ["copy","/Y", job.getPath(), ArcSubDirOrderNumPath + + job.getName()];



var exitCode = Process.execute(CopyCommand);


Copy files (job) into some directiory (Windows)

Posted: Tue Sep 16, 2014 8:21 am
by freddyp
As of version 12 there is separate help for Switch (started from Switch Designer) and for Switch scripting (started from Switch Scripter). That is more convenient when searching in the scripting part because you do not get unnecessary hits.



You find the copy function in the Environment class. It works with the Switch class as well, because that subclasses from the Environment class.



Freddy