Replace all files in a folder with identical filename AND SHA1 hash as original.file with new.file.
Say I have updated the contents of a php file that is used multiple times throughout my project, and now I want all other copies of that file to be updated as well.
In most cases the following code would work:
However if the file is readme.txt or config.php for example, then you'd have overwritten many wrong copies. Using HashReplace only files with the same name and same contents will be overwritten with the new contents.
- replace some_file.php c:\projects\example_project
Source, Executable and Test files