Joining files seems to choose a random output directory

Hi,

Sometimes when I join files DOpus selects a totally different directory than the one the files are in to send the output.

Is there a rule as to what DOpus does to generate the destination folder? I would have thought it would either a) use the common denominator out of the selected files or b) use the folder of the first file.

Is it using the last? If so can you add an option to use one of the two rules above?

If there's a destination Lister/file display, it uses that as the default destination, otherwise it uses the source folder.

Any chance you could make it an option then please?

99.9% of the time I would like to join the file to the same directory. If I want it somewhere else I would use the "Select output file" dialog.

Sure.

Thanks Jon.

Hi Rhino, if you've also usually selected all the files you want to join in a single 'source' folder and don't need to 'Add' files using the Join dialog, then you can use a command like: dopusrt /cmd Join TO "{dlgstring|Joined filename...|{s}}"

Hi steje,

Thanks for your help.

I tried that but the dialog that was displayed had no default filename in there.

I tried using {file} instead of {s} but then I got prompted once for each fot he files I wanted to join.

Don't worry about it though as I'll just wait for Jon to implement the option.

Yeah... I'm not sure why using the {f} or {o} codes causes the function to run synchronously against each selected file... oh well. I could have sworn this worked for someone a while back without it doing this...

Well like all functions using {f} it would be called once per file.

If you add @firstfileonly to the function it should only be called once.

Aha, cool... so this seems to work then:

@firstfileonly
dopusrt /cmd Join FROM {F} TO "{dlgstring|Joined filename... |"{s}{o}"}"

Edit note- I had to throw the FROM {F} in there or otherwise the @firstfileonly directive presumably trashes the selected files as the 'source' of the Join command and brings up the Join dialog without any files in the join list...

Re-edit note- Thanks Jon :wink: