What the Shell is wrong here?

Jan Schenkel janschenkel at yahoo.com
Wed May 21 00:49:01 EDT 2003


--- Howard Bornstein <bornstein at designeq.com> wrote:
> I'm trying to execute a DOS shell command within my
> script to clear the 
> read-only file attribute of a file that has been
> copied from a CD (I'm 
> delivering the app on a CD and need to make one of
> the stacks writable).
> 
> Based on previous posts on this subject, I'm using a
> command that 
> evaluates to:
> 
> get shell ("attrib -r" && "C:\Documents and
> Settings\IFTF\My 
> Documents\Consumer Segmentation\resources\Process
> Guide Steps.rev")
> 
> I've proven that the path is correct for the file
> I'm trying to affect. 
> If I type this command into the Message box however,
> I get this error 
> message:
> 
> Script Compile Error.
> Error Description: Script: missing "" after literal
> 
> I can't figure out where the problem is and what the
> error message means.
> 
> Little help?
> 
> Regards,
> 
> Howard Bornstein
> 

Hi Howard,

DOS doesn't support file and directorynames with
spaces in them, so try the following :

  put "C:\Documents and Settings\IFTF\My
Documents\Consumer Segmentation\resources\Process
Guide Steps.rev" into tFilePath
  get shell ("attrib -r" && quote & tFilePath & quote)

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the use-livecode mailing list