First of all, this process lists all the files that there are in a Siebel Server as a result of an integration between Siebel and an extenal application, a sentence such as:
Clib.system("cmd /c dir /B C:\\Prova_joan\\* > C:\\Prova_joan\\joanprova1.txt");
In order to treat files, I try to read each path:
flist=Clib.fopen("C:\\Prova_joan\\joanprova.txt","rt");
Clib.strncpy(destString [i], sourceString , maxLen);
Clib.fread(Caracter,UWORD8,flist);
Clib.fclose(flist);
Finally, I use a sentence for renaming files, in order to tranfer a file from a directory to another directory:
var Source_Path = "C:\\Prova_joan\\"+ destString [i];
var Destine_Path = "C:\\Prova_Final\\"+Rename;
Clib.rename(Source_Path, Destine_Path );
In parallel, it was created a calculate field that once DDBB save a file name , then returns the path of this one (using string concatenation).