<p>Quotestr puts single quotes around the variable. You need double quotes. Ie. "</p>
<div class="gmail_quote">On 23/06/2011 8:33 AM, "Bob Pawley" <<a href="mailto:rjpawley@shaw.ca">rjpawley@shaw.ca</a>> wrote:<br type="attribution">> Hi<br>> <br>> I’m having trouble with using a variable in a string path.<br>
> <br>> When I use the variable FW_Path := ‘C:\Program Files (x86)’ with two single quotes, the following works well and ShowMessage(ProgramName); displayed the full path .<br>> <br>> When I reference FW_Path to a variable X I get an error returned “Can Not run....” The variable X is returned as C:\Program Files (x86) without quotes. <br>
> <br>> I attempted Quote String and got the following ‘C:\Program Files (x86) with one single quote.<br>> <br>> Both cases return the same error - and in both cases ShowMessage(ProgramName); displayed none of the path after C:\Program Files (x86).<br>
> <br>> Help would be appreciated.<br>> <br>> Bob<br>> <br>> FW_Path := QuoteStr(X); <br>> DXF := openDialog1.FileName; <br>> ProgramName :=FW_Path+'\FWTools2.4.7\bin\ogr2ogr "-f" "PostgreSQL" PG:"host=192........ user=postgres dbname=E5R password=........" "'+ DXF +'" -nln Import_Process';<br>
> <br>> ShowMessage(ProgramName);<br></div>