Closed epi-jhd closed 2 weeks ago
Thanks Jenny, I will work on STRAP this week and that review will be part of my duty ;)
Thanks for changes on txtFindReplace, xlsxFindReplace, fileFindReplace and FilesFindReplace , listing number of changes is great and work well !
I see some redondance between listFiles and getAllFilepath, why not using the first one ?
As far as I understand, listFiles looks into just one level (ie the folder its given) - I needed a function that follows each filepath to the end and can thus get ALL the files within every folder and sub folder. Perhaps we could edit listFiles to have this option? as well as the option to show the full filepath, not just the the file name.
As far as I understand, listFiles looks into just one level (ie the folder its given) - I needed a function that follows each filepath to the end and can thus get ALL the files within every folder and sub folder. Perhaps we could edit listFiles to have this option? as well as the option to show the full filepath, not just the the file name.
ListFiles look recursively into each subdirectories and all sub sub directories (GetAllFiles only looks in first level of subdirectories) . ListFiles has an option to forget hiden directories but no easy option to exclude some ListFiles has a pattern option which let you choose all files with vaccin in name but no option to easily select types (even if this can be done with pattern) Then I suggest to merge them by integrating getAllFiles option into listFiles (which is natively recursive by using base R functions)
I found the recusive functionality of listFiles (did not know abou this!) and it thus does everything required. I have remove getAllFilespaths as not needed.
Ready to merge?
Add output to txtFindReplace, xlsxFindReplace, fileFindReplace and FilesFindReplace to list the filenames = number of changes
Add function getAllFilepaths which finds all files of a specified type within a directory.
These changes are designed to facilitate the work of the admin team when they change the drive file structure and we all need to hunt through our scripts to find if/where we have referenced files on the drive and change them to match the new path.