batch file commands?

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

May 6, 2010

batch file commands? by azure0wind at 5:37 PM (897 Views / 0 Likes) 8 replies

  1. azure0wind
    OP

    Member azure0wind 7 years flew so fast.

    Joined:
    May 24, 2009
    Messages:
    941
    Country:
    Indonesia
    is there a command in cmd that allow you to check exist or not exist a url?
    thanks anyway.
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,711
    Country:
    United Kingdom
    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

    Member tk_saturn GBAtemp Psycho!

    Joined:
    Jan 26, 2010
    Messages:
    3,327
    Country:
    United Kingdom
    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

    Member azure0wind 7 years flew so fast.

    Joined:
    May 24, 2009
    Messages:
    941
    Country:
    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

    Member playallday Group: GBAtemp Ghost

    Joined:
    May 23, 2008
    Messages:
    3,773
    Location:
    [@N@[)@
    Country:
    Canada
    I would ping the server.
     
  6. tk_saturn

    Member tk_saturn GBAtemp Psycho!

    Joined:
    Jan 26, 2010
    Messages:
    3,327
    Country:
    United Kingdom
    How is that going to get you the URL?
     
  7. azure0wind
    OP

    Member azure0wind 7 years flew so fast.

    Joined:
    May 24, 2009
    Messages:
    941
    Country:
    Indonesia
    pinging? that only get the server ip address and memory (?) right? [​IMG]
     
  8. tk_saturn

    Member tk_saturn GBAtemp Psycho!

    Joined:
    Jan 26, 2010
    Messages:
    3,327
    Country:
    United Kingdom
    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

    Member azure0wind 7 years flew so fast.

    Joined:
    May 24, 2009
    Messages:
    941
    Country:
    Indonesia
    oh... okay then so its like powerful than batch file?
     

Share This Page