Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would like to string together a number of variables in a batch file to produce a line of text.

    Example:
    Set oServer=MyServerName
    Set oPath=ServerPath
    Set oFolder=ServerFolder

    Echo %oServer%%oPath%%oFolder%

    The line should read:
    MyServerNameServerPathServerFolder

    The expected results are not what I anticipated.

    Your thoughts are appreciated.

    Thanks,
    John

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It took me awhile but I found some usefull batch command variable examples on the net.

    @echo off
    set var1=Hello
    set var2=World
    echo %var1% %var2%!
    set var1=
    set var2=


    Regards,
    John

  3. #3
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    3,485
    Thanks
    34
    Thanked 201 Times in 180 Posts
    [quote name='jstevens' post='785195' date='18-Jul-2009 16:42']The expected results are not what I anticipated.[/quote]
    Unfortunately you did not state what the result was!

    My test gives exactly what you require, under XP Pro...
    BATcher

    "The trouble with quotes on the internet is that you can never know if they are genuine."
    Abraham Lincoln
    

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •