How to Output Quotation Marks in VBS

VisualBasic Script, or VBS, is a powerful scripting language designed to make it easy to automate simple, but repetitive, tasks on a Windows computer. It is distinct from the Visual Basic programming language and, unlike that language, comes installed automatically on all Windows computers. This means you can write and run VBS commands on any Windows computer without special software. However, one early problem faced by many new VBS scripters is how to output quotation marks within a string of characters. This is because VBS uses the quotation marks for its own purposes to tell when the string begins and ends.

Instructions

    • 1

      Open a text editor.

    • 2

      Paste the following:

      WScript.Echo "A single quote - ' "

      Everything is as expected: to post a single-quote, simply type the single-quote character on your keyboard. If you save this as "quote.vbs" and double-click the file on your desktop, a message will appear with the following text:

      A single quote - '

      The double-quote is a little more tricky, however.

    • 3

      Paste the following:

      WScript.Echo "A double quote - "" "

      Save your work in a file named "quote.vbs" and double-click it. The following dialog will appear on your screen immediately:

      A double quote - "

      As you can see, to output a double quotation mark in VBS, you must place two double-quotation marks directly next to one another.

Related Searches:

References

Comments

You May Also Like

  • How to Echo Variables Using PHP

    The echo function (or more precisely a language construct) is one of the most frequently used functions in PHP. All programming languages...

  • How to Extract a Zip File With VBScript

    When Microsoft released the current generation of its Windows Script Host in 2002, it made available to developers and system administrators a...

  • How to Create VBS Files

    VBScript (Visual Basic Scripting Edition) is a scripting language developed by Microsoft. To create VBS files, you will need to use a...

  • How to Convert iTunes to Windows Media Player Format

    By default, music purchased from the iTunes store is in M4A format, which is free of DRM (Digital Rights Management). Once downloaded...

  • VBS Script File Types

    VBS Script File Types. The VBS file extension is associated with Visual Basic. These are script files which are useful for programming...

  • How to Execute Windows Script Host

    System administrators use Windows Script Host (WSH) files to manage files, update the registry, and perform advanced networking tasks. Windows Script Host...

  • How to Use Quotation Marks

    Include exclamation points and question marks inside the quotation mark if they are part of the text you are quoting. For example,...

  • How Execute VBS Script

    A VBS script is a file that contains VBScript or Visual Basic Scripting codes. You can examine the script's contents by opening...

  • How to Find a Pottery Maker's Marks

    Pottery marks tell a story of the manufacturing process, usually with the country of origin and a logo or signature identifying the...

Related Ads

Featured