title: remove read only using batch
body: <p>I'm trying to create a batch file that copies some files and then removes their "read-only" attribute. </p>
  
  <p>Using windows 8.1.</p>
  
  <p>My file looks something like this:</p>
  
  <pre><code>@echo off 
  set s1=copy successful
  set s2=remove read only successful
  set timer=2
  
  XCOPY C:\my_dir_1\my_dir_2 C:\my_dir_2 /D /E /C /R /I /K /Y 
  echo %s1%
  timeout /T %timer%
  attrib -r C:\my_dir_2 /s /d
  echo %s2%
  timeout /T %timer%
  </code></pre>
  
  <p>The copy is working fine and when I execute this, I see cmd prompt with all the files while they are being copied. The timers are also working as expected, but the remove read only is not. The prompt goes right to the 2nd timer part. I used <a href="https://superuser.com/questions/653951/how-to-remove-read-only-attribute-recursively-on-windows-7">this</a> link as a tutorial.</p>