Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Wget rename file

$
0
0
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 :).

Viewing all articles
Browse latest Browse all 16232

Trending Articles