Am 16.07.2021 um 18:19 schrieb Riccardo (Jack) Lucchetti:
On Fri, 16 Jul 2021, Sven Schreiber wrote:
> I'm struggling with the problem that the join command and
also the
> readfile() function claim my file is not there. In both cases I'm giving
> the absolute path as input. I've checked "visually" that the file
exists.
>
> I'm wondering whether the fact that the path has a space in it (together
> with Windows-backslashes) may be a reason for the problem. (The path is
> in a string variable 'fname' which I then pass to the join cmd as
> "@fname" to have it properly quoted, and plainly as readfile(fname) to
> the function.)
>
> I can do more testing and narrowing-down later, but maybe someone
> already has an idea.
What if you declare the string with double-quotes? As in
string fname = sprintf("\"C:\\My path\\foo.gdt\"")
Doing something like this then yields an invalid argument error
(understandably).
Maybe this is a similar bug as the one from last year, where the join
GUI dialog wasn't working on Windows. I guess it's mostly confined to
the case when you are trying to use absolute paths, because relative
paths do not contain spaces as often.
I'm still not ruling out a kind of stupid typo on my part, but on a
machine without the space in the user name (and hence in the path) my
script appears to work.
thanks
sven