LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Reply
  Search this Thread
Old 09-16-2010, 02:49 PM   #1
Spawn10
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
trying to automate wget commands


I a complete newbie trying to use wget on a windows environment. Anyway, i was wondering if there was a way that I could automate the wget processes by calling it from another application. Is this possible, and has anyone has luck doing this before? Any ideas are welcomed...but please be patient and explain it to me like a 5 year old. I thought maybe a batch file might work, but don't know how to get that done either. Also, if there are any sample code that I can look at, that will also be tremendously helpful.

Thanks
 
Old 09-16-2010, 02:55 PM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
What do you need to know? Run:

wget http://some.webserver.com/whatever/somefile.mp3

and it downloads it to your local pc. There's really nothing else to say, it's prety simple! Put it in a batch file, add it to the scheduler, whatever. It's no different than automating any other process.
 
Old 09-20-2010, 06:56 PM   #3
Spawn10
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Original Poster
Rep: Reputation: 0
Well am trying to figure out a way with which i could specify the url and other wget options outside code. i.e, avoiding hard-coding...so for example, if i want to mirror a site, i want to be able to specify the wget options at the run time for my program.
Is there a way to get this done? or has this been done before?

As an example I might want to specify "-k" in one mirror and not the next, but i want to enter those parameters at run time...any ideas? Thanks
 
Old 09-21-2010, 08:54 AM   #4
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
Try a:

wget --help

You'll see that you can use:

wget -r http://whatever.com

to download basically every html, image, css, etc. it can see from the server. Obviously for any .php and etc., you will see the processed output, not the source.. You'll see a zillion other options that may be of use as well.
 
Old 09-21-2010, 06:38 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <GENERAL> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-22-2010, 09:49 PM   #6
Sitemapper
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
If you are interested in downloading/mirroring websites and using Windows you could either try httrack or A1 Website Download. The first is free/opensource I think and the other shareware (i.e. free to try)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script Commands to Automate Server or Host Telnet Login Session jakesjohn Linux - Software 4 02-08-2010 11:32 PM
Shell Script Commands to Automate Server or Host Telnet Login Session jakesjohn Linux - General 2 02-08-2010 11:28 PM
How to automate 'net cat' commands ? b0nd Linux - General 2 08-27-2008 06:52 AM
Automate Commands at Boot up Ace Blackwell Linux - Newbie 1 04-21-2008 12:09 PM
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration