Dear list,

I have this sample:

    \setupinteraction[state=start]
    \starttext
    \def\cB{file.pdf}
    \def\cC{file with spaces.pdf}
    %~ \def\PathName{\cldcontext{[[\env{completepath}]]}}
    \def\PathName{%
        \cldcontext{string.gsub([[\env{completepath}]], "\\\\", "/")}}
    no spaces: \doifelsefileexists{\PathName\cB}{yes}{no}
    \attachment[file={\PathName\cB}]\\
    with spaces: \doifelsefileexists{\PathName\cC}{yes}{no}
    \attachment[file={\PathName\cC}]
    \stoptext

It works fine in Linux with spaces in file names. I invoke it with:

    context --purgeall --arguments="pathname={~/}" ~/a

But in Windows, the actual invocation involves a loop in a batch file.
Without the loop, it would read (for drag and drop):

    context --purgeall --arguments="completepath=%~dp1" file-above.tex

I don’t get the attachment only with the file that has spaces in its
name (the file is also reported as not existing). The file without
spaces in the its name is being attached and reported as existing.

Does anyone know what might be preventing ConTeXt in Windows not to
recognize the existing file with spaces in its name?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to