Replace all files in a folder with identical filename AND SHA1 hash as original.file with new.file.
Use Cases
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.Formatted for Generic Code with the GeSHI Syntax Highlighter [copy or print]
replace some_file.php c:\projects\example_project
Download
Source, Executable and Test files











Logged
Bard
S.VanDragt.com





