Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

hi

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
GouthamAnand
Asked:
GouthamAnand
  • 3
1 Solution
 
manavsiCommented:
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
 
Todd MummertCommented:

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
 
BillDLCommented:
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
 
BillDLCommented:
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
 
BillDLCommented:
Thank you GouthamAnand.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now