download - wget - specify directory and rename the file -


I am trying to download many files and I need to rename to download, how do I I can specify the directory and I want to download them? I know that I need to use -P and -O to do this but it does not work for me.

I went to a similar situation and came to your question. I was able to write a short bash script which needed me to parse the name of a URL in one column and the other needed to parse the name.

This is the script used for my special needs. If you still need help, then maybe it will give you some guidance.

  #! / Bin / bash FILE = URLhtmlPageWImagesWids.txt Read line while F1 = $ (echo $ line | cut -d "" -f1) F2 = $ (resize $ line | cut-d "" -f2) wget -r -l1 --no-parent -A.jpg -O $ F2.jpg $ F1 did & lt; $ FILE  

This will not really work because -A adds all results in one page You can try using the --no-directories or the --cut-dirs switch And in the loop process you want to rename the files in the folder.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -