Hi,
I want to get NameProper for the job and with this name, I want to make a folder in a specific path and the move the job files. I don´t know how to create a folder. I tried but i haven´t gone on.
The script i use is:
var folderPath = s.getPropertyValue("Ruta" );//take a path where create and leave folder and files.
var carpeta =job.getNameProper();
var rutafin= folderPath+carpeta;
var folder = new Dir(rutafin);// I think that here I have the problem
var nombre = job.getName();
var rutaini=job.getPath()
s.copy(rutaini,rutafin );
job.sendToSingle(job.getPath());
Thanks for you help
Best regards
Miguel
Create a folder in a specific path and move the job's file
-
- Newbie
- Posts: 19
- Joined: Tue Feb 14, 2012 12:18 pm
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Create a folder in a specific path and move the job's file
var folder = new Dir();
folder.mkdir(rutafin);
folder.mkdir(rutafin);
-
- Newbie
- Posts: 19
- Joined: Tue Feb 14, 2012 12:18 pm
Create a folder in a specific path and move the job's file
H,
It doesn´t go on.
The variable ruta I put F:/switch/in/,
But script hasn`t make a folder in that path.
What I make wrong?
Thanks
Best regards
Miguel
It doesn´t go on.
The variable ruta I put F:/switch/in/,
But script hasn`t make a folder in that path.
What I make wrong?
Thanks
Best regards
Miguel
Create a folder in a specific path and move the job's file
If the script is complete I do not see anything that cannot be done with "Set hierarchy path" and "Archive hierarchy".
In "Set hierarchy path" you set the first segment to [Job.NameProper] and in "Archive hierarchy" you set the root F:/Switch/in and that will create the directory and move the job into it.
In "Set hierarchy path" you set the first segment to [Job.NameProper] and in "Archive hierarchy" you set the root F:/Switch/in and that will create the directory and move the job into it.