Solved

hi

Posted on 2009-05-14
5
777 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
Comment Utility
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:climbgunks
Comment Utility

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 38

Expert Comment

by:BillDL
Comment Utility
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 38

Accepted Solution

by:
BillDL earned 500 total points
Comment Utility
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 38

Expert Comment

by:BillDL
Comment Utility
Thank you GouthamAnand.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now