From: sjsean on
I've been given a script with two variable spots for a path. However,
the path I would like to use includes spaces. Can someone advise how
I could do this using below as my example? If I take all spaces out
then the update in my database occurs...but with spaces it does not.

define control_file_path = C:\Documents and Settings\something
\Desktop\this folder

but if I do:

define control_file_path = C:thisfolder

it will work. thanks!
From: Noons on
sjsean wrote,on my timestamp of 20/03/2010 9:04 AM:
> I've been given a script with two variable spots for a path. However,
> the path I would like to use includes spaces. Can someone advise how
> I could do this using below as my example? If I take all spaces out
> then the update in my database occurs...but with spaces it does not.
>
> define control_file_path = C:\Documents and Settings\something
> \Desktop\this folder
>
> but if I do:
>
> define control_file_path = C:thisfolder
>
> it will work. thanks!


from a vague memory, I think you need to put "s around the terms with spaces.
with your example above, like this:
define control_file_path = C:\"Documents and Settings"\something\Desktop\"this
folder"
HTH
From: Galen Boyer on
sjsean <sjsean95126(a)gmail.com> writes:

> I've been given a script with two variable spots for a path. However,
> the path I would like to use includes spaces. Can someone advise how
> I could do this using below as my example? If I take all spaces out
> then the update in my database occurs...but with spaces it does not.
>
> define control_file_path = C:\Documents and Settings\something
> \Desktop\this folder
>
> but if I do:
>
> define control_file_path = C:thisfolder
>
> it will work. thanks!


You might be able to use the 8 character dos representation of the path.

c:\TEMP>mkdir "a b c"
mkdir "a b c"

c:\TEMP>dir /X
dir /X
Volume in drive C is OSDisk
Volume Serial Number is 20C0-F388

Directory of c:\TEMP

03/20/2010 06:32 PM <DIR> .
03/20/2010 06:32 PM <DIR> ..
03/20/2010 06:32 PM <DIR> ABC~1 a b c
0 File(s) 0 bytes
3 Dir(s) 28,588,097,536 bytes free

So, you could reference a file with c:/temp/ABC~1 as the directory path.

But, I guess you might be getting the directory at runtime, and it can
always have spaces in it? Maybe they could give you the path with the
dos representation? Maybe the "BLAH" that noons works for you?

--
Galen Boyer

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: Shakespeare on
Op 20-3-2010 13:29, Noons schreef:
> sjsean wrote,on my timestamp of 20/03/2010 9:04 AM:
>> I've been given a script with two variable spots for a path. However,
>> the path I would like to use includes spaces. Can someone advise how
>> I could do this using below as my example? If I take all spaces out
>> then the update in my database occurs...but with spaces it does not.
>>
>> define control_file_path = C:\Documents and Settings\something
>> \Desktop\this folder
>>
>> but if I do:
>>
>> define control_file_path = C:thisfolder
>>
>> it will work. thanks!
>
>
> from a vague memory, I think you need to put "s around the terms with
> spaces.
> with your example above, like this:
> define control_file_path = C:\"Documents and
> Settings"\something\Desktop\"this folder"
> HTH

That should be: "C:\Documents and Settings\something\Desktop\this
folder" so " around the complete path.
Shakespeare
From: Noons on
Shakespeare wrote,on my timestamp of 22/03/2010 9:05 PM:
> Op 20-3-2010 13:29, Noons schreef:
>> sjsean wrote,on my timestamp of 20/03/2010 9:04 AM:
>>> I've been given a script with two variable spots for a path. However,
>>> the path I would like to use includes spaces. Can someone advise how
>>> I could do this using below as my example? If I take all spaces out
>>> then the update in my database occurs...but with spaces it does not.
>>>
>>> define control_file_path = C:\Documents and Settings\something
>>> \Desktop\this folder
>>>
>>> but if I do:
>>>
>>> define control_file_path = C:thisfolder
>>>
>>> it will work. thanks!
>>
>>
>> from a vague memory, I think you need to put "s around the terms with
>> spaces.
>> with your example above, like this:
>> define control_file_path = C:\"Documents and
>> Settings"\something\Desktop\"this folder"
>> HTH
>
> That should be: "C:\Documents and Settings\something\Desktop\this
> folder" so " around the complete path.
> Shakespeare


Yup indeed! Thanks.