Why am I getting an error here?
Nancy Palmquist
nlp at vss3.com
Mon Jan 28 09:51:14 PST 2008
Kenneth Brody wrote:
> Quoting GCC Consulting (Thu, 24 Jan 2008 14:46:26 -0500):
>
>>> -----Original Message-----
>>> From: filepro-list-
>>> bounces+gccconsulting=comcast.net at lists.celestial.com [mailto:filepro-
>>> list-bounces+gccconsulting=comcast.net at lists.celestial.com] On Behalf
>>> Of Walter Vaughan
> [...]
>>> Boaz Bezborodko wrote:
>>>
>>>> Here is the line:
>>>>
>>>> ac(100,*)="!PDF /f\\server\data\fpro\temp\"&flname{".pdf"
>>>>
>>>>
>>> Because you are escaping the quote after temp with the \, so you are
>>> getting three quotes instead of 4
>> You can replace the windows \ (backslash) with a normal slash /.
>>
>> ac(100,*)="!PDF /f\\server/data/fpro/temp/"&flname{".pdf"
>>
>> This will be read properly by the windows os.
>
> It depends on what he's going to do with that value. While Windows and
> MS-DOS have always[*] accepted either slash at the kernel/API level, there
> are programs that require backslashes in pathnames passed to the in order
> for that program to parse the command line properly.
>
> For example, while my copy of "cat" happily accepts either slash, the
> command shell itself (either command.com or cmd.exe) will not allow me
> to use forward slashes for "type".
>
> However, if it requires backslashes, simply put a space between the
> backslash and close quote, and use "{" to squeeze it back out:
>
> ac(100,*) = "!PDF /f\\server\data\fpro\temp\ " { flname { ".pdf"
>
>
>
> [*] Yes, "always".
> <mode type="pedant">
> Well, "always" as in "ever since MS-DOS addedsubdirectories way back in
> version 2.0". Since MS-DOS 1.0 didn't have subdirectories, it doesn't
> count for this discussion.
> </mode>
>
Just one more option here.
I always put the strings with forward slashes so I can display them if I need to
in filepro and they will read correctly.
ac(100,*)="!PDF /f //server/data/fpro/temp/"&flname{".pdf"
Then use xlate to flip them when you need it for WINDOWS:
xlate(ac,"/",chr("92"))
This allows me to program for WINDOWS and UNIX in the same processing and just
flip the slashes for the DOS commands.
Since no one suggested this I wanted to add it to the options for this type of item.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list