filesstrings is an R package providing convenient functions for moving files, deleting directories, and a variety of string operations that facilitate manipulating file names and extracting information from strings. For example, R has no
file.rename(), so the best way to move a file was to unintuitively rename it.
file.move(). The package’s string operations mostly pertain to dealing with numbers contained within strings. It has a function
NiceFileNums() for fixing file names such that their numbering is consistent with alphabetical order. For example, ‘file10.txt’ comes before ‘file9.txt’ in alphabetical order, so
NiceFileNums() recognises this and renames them to ‘file10.txt’ and ‘file09.txt’ respectively. See documentation at https://cran.r-project.org/package=filesstrings.