Writing text string with imbedded quotes to a text stream

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I want to write a series of comand line strings having imbedded quotes like
this to a command file (.cmd),

erase "C:\Essay\FE8 Teachers\Code Files.SAS" /Q

Can this be done? (I'm sure it can but I cannot figure out how to do it.)
The quotes are necessary because of the possiblity of spaces in parameters of
the command written to the export file.

The key VBA statement that writes these command line strings is:

OutArray(I) = "erase " & "'" & cel(I, 3) & cel(I, 2) & "'" & " /Q" &
vbCrLf

The resulting .cmd file will be executed from a command line window.

As you can see from the code, I am currently using the string "'" to insert
'quotes' around the command lline parameters.

Unfortunately, this does not work. Command line parameters must be brackets
with full fledged quotes (command "param1" "param2") and not asn apostrophe.

How can I include quotes (") in an output string written to a textfile in VBA?

Thank you.

John Wirt



T



.



Relevant Pages

  • [opensuse] Re: apache mod_rewrite
    ... outside of quotes and inside double-quote strings but not inside ... single-quote strings. ... based on the intention of it being included in that command, ... If you want to insist that my read of this is incorrect, ...
    (SuSE)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... If it is a literal space for the ls command, ... wonder what effect the quotes will have placed in different places ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings College ...
    (SuSE)
  • Re: [SLE] bash Script Using Filenames with Embedded Spaces
    ... command, then it must be a literal space for any other command. ... Antonio Vivaldi-Gloria Dixit Dominus Magnificat Choir of Kings ... College Cambridge and the Academy of Ancient Music.m3u ... command is placed inside double quotes, I get the expected ls output: ...
    (SuSE)
  • Re: Bash commands: maybe they want to drive us crazy?
    ... Bill Unruh wrote: ... single quotes would cause the find command to expand the * ... Which means that a shell command and the shell itself are two very different ...
    (comp.os.linux.misc)