How do I define the pathname to a file in WIndows 10
Brian K. White
brian at aljex.com
Tue Dec 8 10:38:48 PST 2015
On 12/8/2015 1:24 PM, Kenneth Brody wrote:
> On 12/8/2015 12:35 PM, Brian K. White via Filepro-list wrote:
>>
>>> or add quotes around the whole string because of the space in My
>>> Documents:
>>>
>>> tf = "\""getenv("USERPROFILE"){x{"My Documents"{x{"foo.txt\""
>>
>> Wups, missing a { between the first "\"" and getenv() :
>>
>> tf = "\""{getenv("USERPROFILE"){x{"My Documents"{x{"foo.txt\""
>
> ... which means that instead of getting a "syntax error" in filePro,
> you'll simply end up with an invalid filename.
>
> (USERPROFILE includes the drive letter, so you can't preface it with
> "\". And, if it didn't include a drive letter, you would now have a
> filename that starts with "\\", which in all likelihood would also be a
> failure.)
>
"\"" not "\"
It's to put quotes around the entire string because of the space in My
Documents. Not a leading backslash
"C:\users\bkw\my documents\foo.txt"
vs
C:\users\bkw\my documents\foo.txt
--
bkw
More information about the Filepro-list
mailing list