title: How to rename a few thousand files by removing everything including and after the last occurance of "by" in the filename
body: <p>I have a few thousand files where the author name is contained in the filename of the file. The main problem this creates is that the filename becomes too long as all authors are mentioned and moving them to different folders becomes impossible to due windows filename length limit. I need to rename the files by removing everything after the last occurance of "by " including the "by " itself.</p>
  
  <p>The only way to rename so many files is to write a program of some sort. What would be the quickest way to do this?</p>