?
Solved

hi

Posted on 2009-05-14
5
Medium Priority
?
816 Views
Last Modified: 2012-05-07
I get zip file daily from a https website. I clik that and downlaod to my local folder. Can I achieve by writing any batch file etc. I want it to make automate. I tried to do using unix but it requies wget utility to download. Is there anything such wget to download through windows. If we can how can we do?
0
Comment
Question by:GouthamAnand
  • 3
5 Comments
 
LVL 4

Expert Comment

by:manavsi
ID: 24392263
if you're downloading from a browser.... then why dont u consider using iMacros for firefox or IE.. It can automate your job...

* Record once your downloading file action and play...just share it on the web using the Share script...
* It will give u a long link... go to tinyurl.com and get urself a short one...
* write a batch file like a snippet below and use ur task scheduler to run daily at ur time... :)

iMacros official web-site: http://www.iopus.com/
I recommend using the firefox with free addon, which should solve ur problem.. :)

HTH
Manavsi
@echo off
@%systemroot%\system32\rundll32.exe url.Dll, FileProtocolHandler http://tinyurl.com/abcdef
REM change the tinyurl.com link to one u generate it... :) this is just a sample...

Open in new window

0
 
LVL 11

Expert Comment

by:Todd Mummert
ID: 24392342

You can get wget for windows.

http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-setup.exe

This includes the wget executable, plus necessary gnuwin dlls.

then you can just use
wget  https://host/rest/of/url


Official page here:

http://gnuwin32.sourceforge.net/packages/wget.htm
0
 
LVL 39

Expert Comment

by:BillDL
ID: 24396797
Another free option you can try.  Although the program dates back to 1998 I have tested it on computers running Windows 98 through to 32-bit Windows XP, and it works well.  I am sure it will not run in full DOS though.

URL2File:
http://www.chami.com/free/url2file_wincon.html

It is part of the "HTML-Kit Tools" package:
http://www.chami.com/

One download link under the "Download / Install" heading for an installer package, and the other for the standalone program file that can just be copied into a folder such as C:\Windows or C:\Windows32 and called from the command line.

I have pasted the command line usage into the Code Snippet below, at the end of which is an example batch file that downloads "ComboFix.exe" (a malware scanning program) from the hosting site.  Copy and paste it into Notepad and save as your reference.  You can get a smaller help by typing URL2FILE -H at the command line.   The example batch file at the end doesn't require a login, but there are switches to allow password and username login.

URL2File 1.981208 (C) 1998, Chami.com
http://www.chami.com/url2file/
 
Downloads content at a specified URL.
 
Usage:
------
 
URL2File <URL> [<FileName>]
                                
Examples:
 
URL2File http://www.chami.com/url2file/test.htm
 
URL2File ftp://ftp.chami.com/README
 
URL2File ftp://ftp.chami.com/README README.txt
 
Advanced usage:
---------------
 
URL2File <URL> [<FileName>] [-d] [-z] [-h] [-b] [-r <referring URL>]
                            [-u <login user name>] [-p <login password>]
                            [-x <proxy address>] [-y <proxy port>]
                            [-s <proxy user name>] [-t <proxy password>]
                            [-a <user agent string>] [-n <sender>]
                            [-o <timeout in seconds>]
 
URL : URL of the web page (HTTP) or file (FTP) to retrieve.
 
Format of the URL:
protocol://[user[:password]@]server[:port]/path[/file]
 
URL2File URL
 
All following parameters are optional.
 
FileName : File name to use to save retrieved content.
 
URL2File URL output.htm
 
-d  Enable debug mode.
    Display warnings and other miscellaneous information.
    Must be specified before other parameters.
 
-z  Suppress critical error messages
 
-h  Display web server's response headers, such as:
    content type/size, cookies, modified and expiration dates,
    HTTP protocol, web server type, etc.
 
-b  Retrieve file using non binary (ie. ASCII) transfer mode.
 
-r  Specify a custom referring URL eg. URL2File -r "ReferringURL" URL
 
-u  Login user name if required by the web server.
    The default user name for FTP URLs is "anonymous".
    It is blank for HTTP URLs.
 
-p  Login password.
    The default password for FTP URLs is "guest@unknown.org".
    It is blank for HTTP URLs.
 
example login:  URL2File URL -uYourName -p"pword"
 
-x  Proxy server address.
-y  Proxy server port.
-s  Proxy server login user name.
-t  Proxy server login password.
 
example proxy login:
URL2File URL -xPROXY -y3128 -sProxyUsername -tProxyPassword
 
-a  Custom user agent string.  Example:  URL2File URL -a "Mozilla"
 
-n  Specify a custom "From:" field in the web server request header.
 
example:  URL2File URL -n "xyz"
 
-o  Timeout value in seconds.
    Downloading will be aborted if not completed within the
    specified amount of time.
    The default value of 0 will disable the timeout function.
 
example:  URL2File URL -o 30
 
Frequently Asked Questions
 
Note: If URLs contain spaces or special characters, use quotes
      around the URL.  eg. "^" or "|" "my page.htm"
 
--------------------------------------------------------------------
 
Trials:
 
@echo off
start /b /wait url2file -d -h -b -o 30 http://download.bleepingcomputer.com/sUBs/ComboFix.exe ComboFix.exe
exit

Open in new window

0
 
LVL 39

Accepted Solution

by:
BillDL earned 2000 total points
ID: 24396920
You can obviously schedule a batch file, just the same as scheduling any other program run.

I use a tiny little scheduler program that, when run in the background from startup, checks its own *.INI file for events to run.  It's easy to type in new scheduled events in Notepad by just observing the syntax.  The program itself has no user interface and uses absolutely minimal resources.

http://www.ericphelps.com/
http://www.ericphelps.com/schedule/index.htm
http://www.ericphelps.com/schedule/schedule.zip

The Readme.txt file in the *.zip file gives clear instructions for usage.
0
 
LVL 39

Expert Comment

by:BillDL
ID: 24419023
Thank you GouthamAnand.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The Windows Firewall provides an important layer of protection and a rich interface to configure it. Unfortunately, it lacks item level filtering. This article details my process of implementing firewall-as-code to reduce GPO bloat.
This is a Step by Step guide to performing a Non-Destructive Windows 10 repair which answers frequently asked questions as to exactly what is lost, and what is kept. Enjoy...
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question