#14554 - 2001-11-23 07:48 PM
Nested quotations
|
Anonymous
Anonymous
Unregistered
|
I need some help here.I am excuting this line and need to know how to make the interpreter see all the quotation for the line to run. I've tried setting it up as variables and using different type of quotation (') and (") but it won't see the third set of marks. Can anyone help? Shell '%comspec% /c c:\ieupdate\su.exe administrator "Copy 'm:\apps\dss\decision support system.dot' 'd:\program files\microsoft office\templates' /Y" @WKSTA' ------------------------------------------
|
|
Top
|
|
|
|
#14556 - 2001-11-23 08:01 PM
Re: Nested quotations
|
Anonymous
Anonymous
Unregistered
|
No,I'm afraid not it still treats the whole things as one and the variable is read as part of the whole string. Thanks Howard
|
|
Top
|
|
|
|
#14560 - 2001-11-23 09:06 PM
Re: Nested quotations
|
Anonymous
Anonymous
Unregistered
|
Wild! I just had this problem yesterday. Here is what I used to get around it: the insertion of an ansi character reference. for example:shell "xxcopy " + chr(34) + "C:\My Documents\*.doc" + chr(34) comes out like this xxcopy "My Documents\*.doc" The key is inserting the chr(34) which stands for the quotations.
|
|
Top
|
|
|
|
#14561 - 2001-11-27 12:17 AM
Re: Nested quotations
|
Anonymous
Anonymous
Unregistered
|
I have tried all those methods with no joy. It seems that it is impossible to have 3 sets of nested quotation marks within a string. I.e. IF the whole string contains more than a nest of two quotations it fails.... Any other ideas?
|
|
Top
|
|
|
|
#14563 - 2001-11-26 01:36 PM
Re: Nested quotations
|
Anonymous
Anonymous
Unregistered
|
That almost worked!However the copy command will not use '' to enclose the path..... If I can find a copy command that will use '' instead of "" I have properly sorted it out.......... If you reverse it back to "" for the sake of the copy command it does not work!!!
|
|
Top
|
|
|
|
#14564 - 2001-11-26 01:41 PM
Re: Nested quotations
|
Anonymous
Anonymous
Unregistered
|
sorry that last post did not come out correctly......... I meant you cannot use single quotation marks to enclose the paramters in the copy command.Howard
|
|
Top
|
|
|
|
#14566 - 2002-11-23 02:53 PM
Re: Nested quotations
|
DrUltima
Fresh Scripter
Registered: 2002-08-16
Posts: 21
Loc: Nashville, TN, USA
|
I had a very similar problem, and I found that Kellar's fix worked, but I had to get rid of the extra spaces before and after hte plus mark (+). That in mind, I think the line you want should look something like this:
code:
Shell "%comspec% /c c:\ieupdate\su.exe administrator Copy "+chr(34)+"m:\apps\dss\decision support system.dot d:\program files\microsoft office\templates /Y"+chr(34)+" @WKSTA"
What do you think?
|
|
Top
|
|
|
|
#14568 - 2002-11-23 03:54 PM
Re: Nested quotations
|
Jochen
KiX Supporter
   
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
|
Top
|
|
|
|
#14571 - 2002-11-25 08:12 PM
Re: Nested quotations
|
DrUltima
Fresh Scripter
Registered: 2002-08-16
Posts: 21
Loc: Nashville, TN, USA
|
Not actually a doctor, but I support a bunch of them. Screen name is mostly tongue in cheek. I know it was old, I was just looking for advise on one of many solutions. I am just learning the Kix language. I am sorry if I sound like a dolt. I will try not to do any more autopsies.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1045 anonymous users online.
|
|
|