Copy files (job) into some directiory (Windows)

Post Reply
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Copy files (job) into some directiory (Windows)

Post by dkelly »

Why not use the built-in copy function?



s.copy(srcPath, dstPath);


dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

Copy files (job) into some directiory (Windows)

Post by dkelly »

Or try this



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



var exitCode = Process.execute(CopyCommand);

freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Copy files (job) into some directiory (Windows)

Post 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
Post Reply