Wget rename file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Wget rename file
# 1  
Old 04-27-2015
Wget rename file

Is it possible to use a cookie transfer to a location and then rename the output?

Code:
 cd target_directory
wget -x --load-cookies cookies.txt http://172.24.188.113/data/getCSV.csv |
for file in *
do
   mv $file $file.txt
done

For example, if I change the directory to C:\test and use the wget command, the getCSV is downloaded to that C:\test directory as a text file. Thank you Smilie.
# 2  
Old 04-27-2015
Hi

You might want:
Code:
wget -O getCSV.txt http://172.24.188.113/data/getCSV.csv

hth
This User Gave Thanks to sea For This Post:
# 3  
Old 04-28-2015
Thank you, works great Smilie.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wget - working in browser but cannot download from wget

Hi, I need to download a zip file from my the below US govt link. https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP I only have wget utility installed on the server. When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies

2. UNIX for Dummies Questions & Answers

Wget ouput to log file

Hi all The following code will update the Dynamic DNS server at Namecheap.com. wget -O 'https://dynamicdns.park-your-domain.com/update?host=www&domain=example.com&password=your DDNS password'Would like to append the output to a log file using >> /path/path/logfile at the end of the command. ... (7 Replies)
Discussion started by: CRChamberlain
7 Replies

3. Shell Programming and Scripting

How to download file without curl and wget

Hi I need a Shell script that will download a zip file every second from a http server but i can't use neither curl nor wget. Can anyone will help me go about this task ??? Thanks!! (1 Reply)
Discussion started by: rubber08
1 Replies

4. Shell Programming and Scripting

wget same filename from subdirectories and rename or concat

I would like to wget a file "index.html" from a site which is lies in different subdirectories and is different in size. The index.html shall be concatenated or renamed to index01.html index02.html .... I would like to store this file in just one directory and use the option -nd. Though i can't get... (0 Replies)
Discussion started by: sdf
0 Replies

5. UNIX for Dummies Questions & Answers

wget redirect file name

I am downloading a file using wget and the following is embedded in a script: wget http://www.example.com/ABCDfilename123.txt -O filename123.txt Because the 123 is incremented with every day, I need to pass the file in a parametric manner, so the filename as given after capital D. How do I... (2 Replies)
Discussion started by: figaro
2 Replies

6. Shell Programming and Scripting

wget and rename

I want to download xyz.php to abc.php and save it in the directory mentioned. wget -directory-prefix=/usr/local/apache/htdocs/ http://somesite.com/xyz.phpThis command will save the file as xyz.php but the following does not work... wget -directory-prefix=/usr/local/apache/htdocs/abc.php... (1 Reply)
Discussion started by: shantanuo
1 Replies

7. UNIX and Linux Applications

download file using wget

I need to download the following srs8.3.0.1.standard.linux26_32.tar.gz file from the following website: http://downloads.biowisdomsrs.com/srs83_dist There are many gzip files along with the above one in the above site but I want to download the srs8.3.0.1.standard.linux26_32.tar.gz only from... (1 Reply)
Discussion started by: alphasahoo
1 Replies

8. Shell Programming and Scripting

download a particular file using wget

Hi All I want to download srs8.3.0.1.standard.linux24_EM64T.tar.gz file from the following website : http://downloads.biowisdomsrs.com/srs83_dist/ But this website contains lots of zipped files I want to download the above file only discarding other zipped files. When I am trying the... (1 Reply)
Discussion started by: alphasahoo
1 Replies

9. UNIX for Dummies Questions & Answers

Using wget to download a file

Hello Everyone, I'm trying to use wget recursively to download a file. Only html files are being downloaded, instead of the target file. I'm trying this for the first time, here's what I've tried: wget -r -O jdk.bin... (4 Replies)
Discussion started by: thoughts
4 Replies

10. Shell Programming and Scripting

Script to download file using wget

Hi I need a Shell script that will download a text file every second from a http server using wget. Can anyone provide me any pointers or sample scripts that will help me go about this task ??? regards techie (1 Reply)
Discussion started by: techie82
1 Replies
Login or Register to Ask a Question