Pattern pattern = Pattern.compile(fileSpec, 0);
Matcher matcher = pattern.matcher(fileName);
if (matcher.find()) {
Variable_set newParams = spooler.create_variable_set();
if (spooler_task.params() != null)
newParams.merge(params);
newParams.set_var(conVarname_ftp_file_path, (remoteDir.endsWith("/") || remoteDir.endsWith("\\") ? remoteDir : remoteDir + "/")
+ fileName);
newParams.set_var("ftp_parent_order_id", spooler_task.order().id());
newParams.set_var("ftp_order_self_destruct", "1");