
Rename chapter text files in a folder to a sequential order
Source:R/rename_chapters.R
rename_chapters.RdScans a folder for .txt files and renames them to chapter1.txt, chapter2.txt, ... using heuristics for ordering (intro, part 1/2, numeric chapter numbers, appendix, etc.).