Help with bat files

Discussion in 'Software' started by mastermosley, Feb 15, 2005.

  1. mastermosley

    mastermosley Sergeant

    I want to no how i can link to a website like my own, with a bat file and download a file from it without the need for visual like IE.
     
  2. NeoNemesis

    NeoNemesis Moutharrhea

    why. sounds like something fishy.
     
  3. mastermosley

    mastermosley Sergeant

    cus i want to do an internet test through .bat instead of downloading through IE it goes through windows installer, through bat it just downloads and it will tell you the transfer rate allot easeir. Check out me website


    www.sharkzprograming.com
     
  4. fishkake

    fishkake Private E-2

    Couldn't you use the command prompt "ftp" and connect to an FTP server on the same address? That would work, I think, and I think you can specify everything you need, like the download location and stuff.
     
  5. QuickSilver

    QuickSilver Corporal

    Using FTP would only work if the webserver that you are trying to connect to had some sort of ftp server configured. If it didn't you would fail to connect. I don't know off the top of my head what ratio of hosted websites out there would have ftp set up against those that wouldn't...

    You clearly aren't using Linux or you wouldn't be using BAT files, but on Linux there is a text based broswer called Lynx - whilst I haven't used this and don't know what you can and can't do with it I am sure there would probably be a way to do this sort of thing using it.

    My 2 cents...
     
  6. Coco

    Coco Sergeant Major

    On linux, you wouldn't use lynx at all you could just use the wget command.

    Windows on the other hand does not support what you need to accomplish this. There is no built in command line tool which can download from a website using HTTP as the protocol. So basicly, you can't do what you want unless it has an ftp, or unless you find some command line app that works under windows which can download from the command line. There most likely is one out there that somebody made, but I don't know of it.
     
  7. QuickSilver

    QuickSilver Corporal

    Spot on...

    I was having the same thoughts that you put down with doing that kind of thing in Windows... (that there isn't an app to support it)

    No excuse for forgetting wget though :rolleyes:
     
  8. mastermosley

    mastermosley Sergeant

    I no about the ftp but when you connect say mastermosley.blabla.com it connects but say u put in the text document

    ftp mastermosley.blabla.com
    anonymous
    a@a.com
    cd /master/downloads
    get fun_flash

    the bat file will not continue after the ftp login and it won't type in the user or password. But after that when you quit, 'quit' then all the infomation in the text document will go in but it won't do nothing cus its not logged in anymore.

    (I understand if you dont understand what i just said)
     
  9. Coco

    Coco Sergeant Major

    You'll have to make use of a separate file.

    "-s:FileName : Specifies a text file that contains ftp commands. These commands run automatically after ftp starts. This parameter allows no spaces. Use this parameter instead of redirection (<). "

    So in the bat file the command should be "ftp -s:commands.txt mastermosley.blabla.com" and then you'd have a second file called commands.txt which has

    anonymous
    a@a.com
    cd /master/downloads
    get fun_flash

    If you need more info on how to use ftp from the command line you can always check here http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ftp.mspx or type "ftp -?"
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds