From mc@ai.uga.edu Thu Jun  7 01:45:44 2001
Received: from c007.snv.cp.net (c007-h014.c007.snv.cp.net [209.228.33.221])
	by swi.psy.uva.nl (8.11.2/8.11.2) with SMTP id f56Njh312644
	for <prolog@swi.psy.uva.nl>; Thu, 7 Jun 2001 01:45:43 +0200 (MET DST)
Received: (cpmta 15280 invoked from network); 6 Jun 2001 16:45:36 -0700
Received: from dsl-64-128-248-185.telocity.com (HELO MINERVA) (64.128.248.185)
  by smtp.telocity.com (209.228.33.221) with SMTP; 6 Jun 2001 16:45:36 -0700
X-Sent: 6 Jun 2001 23:45:36 GMT
Message-ID: <004601c0eee2$c8365f40$c901a8c0@MINERVA>
From: "Michael A. Covington" <mc@ai.uga.edu>
To: <prolog@swi.psy.uva.nl>
Date: Wed, 6 Jun 2001 19:45:34 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Subject: [SWIPL] Annoying problem with filenames as command line arguments

I am trying to use SWI-Prolog as a script engine under Windows 2000, using
an IIS command template like:

"C:\Program Files\pl\bin\plcon.exe" -f %s -g start -t halt

That means: Load the file %s (where %s stands for the filename passed by the
CGI engine), then execute goal 'start', and afterward or upon hitting any
error, halt.

The problem:  Windows passes file names to script engines as full paths,
such as 'c:\inetpub\scripts\myscript.swi', but SWI-Prolog will *not* accept
these.  It wants forward slashes or double backslashes.

I think that whatever else a Prolog system wants to do about filenames, on
the command line it ought to accept filenames in the operating system's
native format.  Is there a workaround?  I tried putting quotes, backquotes,
etc., around '%s' and it didn't help.  I can devise a klugey workaround
using cmd.exe, if absolutely necessary, but it's ugly.

Michael A. Covington - Artificial Intelligence Ctr
The University of Georgia - Athens, GA 30602-7415 USA
http://www.CovingtonInnovations.com  http://www.ai.uga.edu/~mc <><

