[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Windows batch file parameter with spaces



On 3/31/2015 10:04 PM, jcalitz wrote:
Hi

I'm trying to pass the path of Rscript, stored as a variable on the
execution machine, as a parameter to a batch script.  The path is
however split at the space when passed to the batch file.

On the execution node, the owner will have

HAS_R = True
R_PATH = "C:\Program Files\R\R-3.1.1\bin"
STARTD_ATTRS = HAS_R, R_PATH, $(STARTD_ATTRS)

On the submission machine, the submission file contains

Executable = run$$(OpSys).bat
transfer_input_files = test.R
arguments = $$(R_PATH) $(Process)

When HTCondor has a .bat as an executable, it runs it via cmd.exe. I thought on Windows cmd.exe shell, to pass command line arguments with spaces as a single argument you would enclose in double quotes. So perhaps just change the above arguments line to

   arguments = "$$(R_PATH)" $(Process)

?

Hope this helps
Todd