title: Downloading .j2k or .png files using wget:if else condition
body: <p>I am downloading folder consisting of either j2k or png file using wget. 
  Now i want while downloading folder if user is requesting .j2k file and if .j2k file is not existing in that folder then by default download .png file. 
  i.e. i want download j2k if present || download .png file.</p>
  
  <p>I have used like this</p>
  
  <pre><code>wget -d any.com -i /folder -r -l 1 -nc -A j2k,png
  </code></pre>
  
  <p>-d: download  from this Domain
   -i: download from this foldern
   -r: recursive
   -l 1: follow only 1 link deep
   -nc: no clobber = download only if file doesn't exist
   -A: accept/download only all *.ogg and *.mp3 </p>
  
  <p>but using this it is downloading both j2k and png.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Referred Links:
  <a href="https://superuser.com/questions/412114/wget-if-else-download-condition">wget if else download condition</a>
  <a href="http://www.gnu.org/software/wget/manual/html_node/Logging-and-Input-File-Options.html" rel="nofollow noreferrer">wget manual</a></p>