Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Multiline variable in Batch script  (Read 56445 times)

0 Members and 1 Guest are viewing this topic.

JLawrence

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 7
    Multiline variable in Batch script
    « on: November 24, 2020, 06:36:15 AM »
    For work I frequently need to email the same emails to users who need my assistance. Things like "I'm glad I was able to assist you, if you need ..."
    I have a few scripts that write those variable to my clipboard so  I just need to paste them into my email.  Is there a way to turn an output of
    I'm glad I could help Joshua
    into
    I'm glad I could help
    Joshua


    here is the script I have already.


    echo|set /p="Glad I could helpJoshua"
    paste | command | clip



    and with that i need to go back and put an enter in.  Is there a better way?





    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Multiline variable in Batch script
    « Reply #1 on: November 24, 2020, 03:31:59 PM »
    Not sure about a better way, but this will get two lines on the clipboard:

    Code: [Select]
    (echo Glad I Could Help && echo Joshua) | clip

    Tested on Win10 using Notepad to paste data from clipboard.

    Good luck,  8)

    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein