Oh, you're right, Arbee...

But the idea is to run the next process just after finishing the last one. I just want to automate the process (put every cue+bin in the same folder, run a script and convert every one to CHD after some time).

I don't know how to create a script for this yet.
Would it be something like this?

var inputFolder = "c:/input";
var outputFolder = "c:/output";
var file;
var id;

   id=???;//I want to create the outputfile with the same name of the original, but .chd. Example: mame.cue -> mame.chd
   chdman.projectSetCreateCDInputFile(id, file);
   //wait until the process finish

(one after other, of course)

Ps.: there's any script file to take a look?

"A user interface is like a joke. If you have to explain it, it's not that good."