Home
Forum
Software
Mouser's Software
NANY: New Apps for the New Year
Friends of DC
Forum Coding Snacks
Editorials
Daily Blog
Monthly Newsletter
Mini Reviews
Favorite Websites
Archives
Articles
Historical Archives
Testimonials: What Folks Say About Us
Licensing
Get a License Key
Commercial Licensing
Help
Search
FAQs
DonationCoder Sitemap
Live Chat (Discord)
Contact Us
About Us
Donate
Home
Forum
Software
Mouser's Software
NANY: New Apps for the New Year
Friends of DC
Forum Coding Snacks
Editorials
Daily Blog
Monthly Newsletter
Mini Reviews
Favorite Websites
Archives
Articles
Historical Archives
Testimonials: What Folks Say About Us
Licensing
Get a License Key
Commercial Licensing
Help
Search
FAQs
DonationCoder Sitemap
Live Chat (Discord)
Contact Us
About Us
Donate
This topic
This board
Entire forum
Website and forum (google)
Member search
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
6 Months
Forever
Login with username, password and session length
Thursday September 19, 2024, 8:56 am
Proudly celebrating 15+ years online.
Donate now
to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
Forum Home
Search
Login
Register
Recent Topics
Go To..
Recently updated topics
Recent posts (compact)
Recent posts (full text)
DonationCoder.com Forum
»
DonationCoder.com Software
»
Coding Snacks
»
Finished Programs
»
DONE: HashReplace - Replace all files with identical contents
« previous
next »
New Topic
Print
Pages: [
1
] •
bottom
Author
Topic: DONE: HashReplace - Replace all files with identical contents (Read 16481 times)
justice
Supporting Member
Joined in 2006
Posts:
1,898
DONE: HashReplace - Replace all files with identical contents
«
on:
June 15, 2011, 07:42 AM »
What it does:
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:
Code: Text
[Select]
replace some_file.php c:\projects\example_project
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.
Download
Source, Executable and Test files
«
Last Edit: June 15, 2011, 07:47 AM by justice
»
mouser
First Author
Administrator
Joined in 2005
Posts:
40,913
Re: DONE: HashReplace - Replace all files with identical contents
«
Reply #1 on:
June 15, 2011, 10:26 AM »
very nice idea!
justice
Supporting Member
Joined in 2006
Posts:
1,898
Re: DONE: HashReplace - Replace all files with identical contents
«
Reply #2 on:
June 26, 2012, 07:16 AM »
If you want to play with the latest source, you can now fork from Bitbucket:
https://bitbucket.or...vandragt/hashreplace
I'll keep posting executable releases in this topic when they're available.
david842
Member
Joined in 2016
Posts:
6
Re: DONE: HashReplace - Replace all files with identical contents
«
Reply #3 on:
February 02, 2019, 10:47 AM »
In most file systems, you
cannot
have two or more files with the
same
filename in the
same
directory. So, I assume the problem description should specify that the replacements get done in the files of a given directory and its subdirectories.
New Topic
Print
Pages: [
1
] •
top
« previous
next »
DonationCoder.com Forum
»
DonationCoder.com Software
»
Coding Snacks
»
Finished Programs
»
DONE: HashReplace - Replace all files with identical contents