{allfilepath} not quoting paths/files with spaces

I'm not sure if this is a bug, but I think so? This command does not quote the paths/files with spaces in them correctly. It doesn't matter if it's a DOpus internal command, or a Batch file -

cmd /k "echo {allfilepath}"

This works correctly as a Batch file -

echo {allfilepath}

Currently to work around this problem, I have to do -

cmd /k "echo {allfilepathshort}"

I prefer to use 'cmd /k' so I can use the DOpus internal commands instead of batch files, as they seem to execute quicker, and do not leave the BAT file in the temp folder. So is this a bug, or the intended behavior? Why?

Feature request maybe - can DOpus be set to automatically delete/secure delete the temp BAT files it creates when running Batch commands?

Oh, and this command quotes the contained files correctly, but puts an extra set of quotes (as it should) around the whole output. Why are the paths/files quoted correctly here but not above?

cmd /k "echo "{allfilepath}""

I'd say you've found a case that confuses the automatic quoting that Opus adds.

Do you actually need to enclose the command after cmd /k in quotes? This seems to work fine for me:

cmd /k echo {allfilepath}

There shouldn't be much difference in speed between one method and the other. What sort of speed difference are you seeing? Is it just a delay before the command starts (how long?) or does the whole thing run slower (how much slower?)?

The temporary .bat files that Opus creates should be cleaned up periodically by a background thread so you shouldn't have to worry about them. (They are not secure-deleted though.)

I could have sworn I read somewhere that the string following cmd /k or /c had to be quoted, but now I can't find it again. I use it for a UPX commandline, so I'll have to test if I can leave out those quotes.

The speed difference is in the execution. There's a delay when a BAT file is used (presumeable while it's compiled).

And when using DOpus on a USB key, the temp BAT files are not cleaned up, since the background process is not running.

Hmm, yes I need the quotes. This command will not run without them (%PADrive% is an environment variable) -

@confirm UPX selected file(s)?

cmd /k ""%PADrive%\PortableApps\UPX\upx.exe" {allfilepath$} --best --compress-icons=0 --nrv2e --crp-ms=999999 -k"

If I leave out the first and last quote I get -

"The filename, directory name, or volume label syntax is incorrect."

I'm surprised there is any noticeable delay, unless an anti-virus tool is slowing things down by inspecting .bat files or something like that.

If I make an MS-DOS Batch Function type of button which runs

echo {filepath} pause
then the results appear instantly. That button would turn into one echo command per selected filename and so should be representative of a long batch file, unless the slowdown is caused by something very particular.

The clean-up thread isn't in a separate process; it's just a thread within dopus.exe.

If the temp files are not being cleaned up then there may be a problem there, but have you waited a few minutes for the clean-up to take place?

(Note: If you remove the USB stick while Opus is still running from it then the process gets terminated by Windows and Opus can't do anything about it, so in that situation temp files may be left around if they were not yet cleaned up. Shutting down properly, or simply waiting a few minutes, should mean they get cleaned up, though, unless something is going wrong.)

That's probably why. I don't usually leave it running very long, and I'm impatient :wink: I use it and have it set to close the process when closing the lister.

I'll revisit the Batch file and test it out, but for now


works for me.