Can't get good output from SYSTEM

Boaz Bezborodko boaz at mirrotek.com
Thu Jan 24 18:07:09 PST 2008


Never mind about the linefeed.  I figured it out.

Boaz

Kenneth Brody wrote:
> Quoting Boaz Bezborodko (Thu, 24 Jan 2008 17:37:09 -0500):
>
> [...]
>> Then: flname="f:/fpro/temp/"&ab{PrintFileName{aa ◄
> [...]
>> Then: ad=flname{".txt" ◄
> [...]
>> Then: SYSTEM "TYPE "&ad&" >> "&af ◄
>> 13 ------- - - - - - - - - - - - - - - - -
>>
>> The error occurs at line 12. I have tried any number of different ways
>> and I can't get it to work right. The error I'm getting is
>> "The syntax of the command is incorrect."
>>
>> But if I type the results directly into the Command line it works fine.
>>
>> What am I doing wrong.
>
> Are you _sure_ you are typing in the exact same command at the command
> prompt, including the use of forward slashes?
>
> ==========
> C:\temp>type c:/config.sys
> The syntax of the command is incorrect.
>
> C:\temp>type c:\config.sys
> device=c:\windows\system32\ansi.sys
>
> C:\temp>
> ==========
>
> As I stated in my example, command.com/cmd.exe internal commands to not
> parse filenames with forward slashes.  My example coincidentally used the
> "type" command.
>
> For the above SYSTEM command to work, you _must_ use backslashes.  That's
> simply a limitation of the TYPE command.  (Note, however, just to add to
> the confusion, the ">" redirection does take forward slashes.)
>


More information about the Filepro-list mailing list