--- In [email protected], [EMAIL PROTECTED] wrote:
> > "c:\Program Files\totalcmd\lister.exe" /i=%COMMANDERPATH%
\totalcmd.ini"
> %var%
> 


Need to make some assumptions on this:
- CommandPath is a literal name for an environment variable.
- var is a PowerPro variable containing the name of an environment 
variable
- the final " at the end is intended to be part of the command 
parameters (and not a delimiter on the command line).
- this final " is followed by a space

I would use


local cmd = ?"c:\Program Files\totalcmd\lister.exe"
local param= ?"/i="++env("COMMANDPATH")++?*\totalcmd.ini" *++env(var)
Do (cmd, param)

You can also write (one line)

Do (?"c:\Program Files\totalcmd\lister.exe", ?"/i=" ++ env
("COMMANDPATH")++?*\totalcmd.ini" * ++ env(var))


I suggest you avoid &() and %...% in expressions, eg Do statement.  
(The reason is that &() and %...% do macro-type text expansion, 
which can cause unexpected errors if the resulting text 
includes "special" characters like \ or ".)


> 
> C:\path space\file.exe /i=c:\path space\file.ini c:\path space
> 
> Now replace with env variables
> 
> %var1%\file.exe /i=%var1\file.ini %var%
> 
> Now replace with ppro variables (not in the &() syntax, but in the 
do()
> syntax)
> 
> &(var1)\file.exe /i=&(var1)\file.ini &(var1)


To put above in Do syntax, avoid & and %...%.  Write env(var1)++.  
Write var1++, not &(var1).

Use ?"..." to avoid problems with escape characters in file paths, 
or write file paths literally with forward slashes.




>




Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to