batch file commands?

Discussion in 'General Off-Topic Chat' started by azure0wind, May 6, 2010.

  1. azure0wind
    OP

    azure0wind GBAtemp Advanced Fan

    Member
    942
    16
    May 24, 2009
    Indonesia
    is there a command in cmd that allow you to check exist or not exist a url?
    thanks anyway.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    23,361
    9,153
    Nov 21, 2005
    Via a straight up windows command line hard to say, similarly do you want a "does something resolve and go somewhere" or "has someone registered the (sub)domain"?

    If the former a straight up ping might work (although some servers fail to return requested information to ICMP requests and you also have nslookup (does however rely on local DNS and goes up the line so your firewall or ISP can mess somewhat with this).

    I will however note most of the simple methods can fall over if you use something like openDNS or your ISP does similar things (adverts on bad urls).

    If you are looking at simple command line applications wget http://gnuwin32.sourceforge.net/packages/wget.htm might be of use here but I have not played with it much beyond grabbing simple files/pages.
     
  3. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
    No. You'll have to switch to VBscript or Powershell, both of which are built into Windows. You could check if a Domain name exists from the command line, but not a URL.
     
  4. azure0wind
    OP

    azure0wind GBAtemp Advanced Fan

    Member
    942
    16
    May 24, 2009
    Indonesia
    so in VBScript, what is the code? can you tell me?
    btw, what is powershell?
    @FAST: well thanks, that would be helpful for my project [​IMG]
     
  5. playallday

    playallday Group: GBAtemp Ghost

    Member
    3,773
    9
    May 23, 2008
    Canada
    [@N@[)@
    I would ping the server.
     
  6. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
    How is that going to get you the URL?
     
  7. azure0wind
    OP

    azure0wind GBAtemp Advanced Fan

    Member
    942
    16
    May 24, 2009
    Indonesia
    pinging? that only get the server ip address and memory (?) right? [​IMG]
     
  8. tk_saturn

    tk_saturn GBAtemp Psycho!

    Member
    3,327
    14
    Jan 26, 2010
    It's been years since I used VBScript.

    Powershell? That's the replacement for batch files. Goto a command prompt and type "Powershell"

    http://technet.microsoft.com/en-us/library/cc498722.aspx
     
  9. azure0wind
    OP

    azure0wind GBAtemp Advanced Fan

    Member
    942
    16
    May 24, 2009
    Indonesia
    oh... okay then so its like powerful than batch file?