8. Request Destination Directory
add chapter

Query of the target directory from the user. The transfer destination must always be set as the first transfer destination.

In the subsequent transfer targets, the corresponding value is set as the target directory under “Base”. Bsp.: $job.getKeyValue(’slub_folder‘)$ oder $job.getKeyValue(’subhh_folder‘)$\$job.name$

// ---------------------------------------------------------------
// Example of a directory query by the user
// the selected directory ends up in the entry 'slub_folder'
// in the job's keyMap and can be used by later transfer targets
// ---------------------------------------------------------------

target_folder = ut.askUserFolder ('Please choose a directory', 'C:/exports');
target_folder = ut.trimmed(target_folder);

//ut.notifyUser('selected directory:', '"' + target_folder + '"');

if (target_folder.length > 0)
  job.setKeyValue('slub_folder', target_folder);
else {
  // Cancellation by the user leads to cancellation of the entire transfer...