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

Author Topic: Good morning / Good afternoon display in BAT  (Read 9947 times)

0 Members and 1 Guest are viewing this topic.

Helpmeh



    Guru

  • Roar.
  • Thanked: 123
    • Yes
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 8
Re: Good morning / Good afternoon display in BAT
« Reply #15 on: May 28, 2009, 05:34:53 PM »
My domain is my pc name... :o
Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.

TheHoFL

    Topic Starter


    Intermediate

    Thanked: 5
    Re: Good morning / Good afternoon display in BAT
    « Reply #16 on: May 28, 2009, 05:37:28 PM »
    It will be if you are not joined to a domain. Are you using a computer that is connected to a domain? I find that other apps like BGinfo also will report the computer as that domain name if the computer is not joined to a domain.
    All your dreams can come true if you have the courage to pursue them.  - Walt Disney

    Helpmeh



      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: Good morning / Good afternoon display in BAT
    « Reply #17 on: May 28, 2009, 05:42:58 PM »
    It will be if you are not joined to a domain.

    Oh well...Anyway, have fun at CHF!
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    TheHoFL

      Topic Starter


      Intermediate

      Thanked: 5
      Re: Good morning / Good afternoon display in BAT
      « Reply #18 on: May 28, 2009, 05:44:45 PM »
      CHF?  ???
      All your dreams can come true if you have the courage to pursue them.  - Walt Disney

      Helpmeh



        Guru

      • Roar.
      • Thanked: 123
        • Yes
        • Yes
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 8
      Re: Good morning / Good afternoon display in BAT
      « Reply #19 on: May 28, 2009, 05:46:53 PM »
      Where's MagicSpeed?
      Quote from: 'matt'
      He's playing a game called IRL. Great graphics, *censored* gameplay.

      TheHoFL

        Topic Starter


        Intermediate

        Thanked: 5
        Re: Good morning / Good afternoon display in BAT
        « Reply #20 on: May 28, 2009, 05:56:51 PM »
        Hahaha! Wow ... long day here at work.

        Thank you and you too!
        All your dreams can come true if you have the courage to pursue them.  - Walt Disney

        TheHoFL

          Topic Starter


          Intermediate

          Thanked: 5
          Re: Good morning / Good afternoon display in BAT
          « Reply #21 on: June 08, 2009, 12:20:23 PM »
          Sorry to bring this one back up, but i am get having issues with this one.

          I am using the following and it is not return how i believe it should.
          Code: [Select]
          for /f "delims=:" %%A in ("%time%") do if %A LSS 12 (echo Good morning!) else (echo Good afternoon!)
          Is returning:
          Quote
          Good Afternoon!

          Its before 12pm here and it should display "Good morning!". I modified the code Helpmeh sent. Can you please explain how this is not working. I added a "%" before the "%A" after  "delims=:"

          Thanks everyone!

          EDIT: I figured it out. Sorry. Just an FYI...I added another % to the other "%A".

          New working code:
          Code: [Select]
          for /f "delims=:" %%A in ("%time%") do if %%A LSS 12 (echo Good morning!) else (echo Good afternoon!)
          All your dreams can come true if you have the courage to pursue them.  - Walt Disney