[NTG-context] playing with Windows drag & drop

Pablo Rodriguez oinos at gmx.es
Tue Oct 6 21:26:21 CEST 2020

On 10/6/20 5:57 PM, Henning Hraban Ramm wrote:
>> Am 06.10.2020 um 16:18 schrieb Pablo Rodriguez <oinos at gmx.es>:
>>  [...]
>>  REM ~ context --purgeall --arguments="PDFdocument=%1" b.tex
>> I’m afraid it only works if the batch file and the PDF document are on
>> the same directory.
>> I guess this is related to "\" in Windows paths. Is there a way to make
>> it work with the sample above?
> Did you try with / paths? They usually work on Windows, no need for \s.

Many thanks for your reply, Hraban.

I wish I could do that. I get the paths from a Windows .bat file.

I drop PDF docuemnts to the .bat file, this is the reason I get the
paths with backslashes.

I use something like that:

  for %%A in (%*) do (
   context --purgeall --arguments="PDFDoc={%%~A} b.tex

But to replace backslashes with slashes, I would need something like this:

  for %%A in (%*) do (
   context --purgeall --arguments="PDFDoc={%%%~A:\=/%} b.tex

But that prevents the batch file from working at all.

I don’t know whether there is a workaround for this.

Many thanks for you help,


More information about the ntg-context mailing list