Popular Tcl recipes tagged "tcl"http://code.activestate.com/recipes/langs/tcl/tags/tcl/popular/2017-04-10T13:51:58-07:00ActiveState Code RecipesRecursive fc/diff for Windows, optionally copy missing/different files (Tcl) 2017-04-08T16:40:25-07:00John Brearleyhttp://code.activestate.com/recipes/users/4184423/http://code.activestate.com/recipes/580776-recursive-fcdiff-for-windows-optionally-copy-missi/ <p style="color: grey"> Tcl recipe 580776 by <a href="/recipes/users/4184423/">John Brearley</a> (<a href="/recipes/tags/compare/">compare</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/tcl/">tcl</a>). </p> <p>Utility to add recursive capability to fc.exe on Windows. Will optionally copy/update missing or older files as needed. If you have a diff.exe in your path, say from having installed TkDiff utility, the diff.exe will be used as the prirmary compare tool, with fc.exe as the backup tool.</p> diff_copy.tcl Utility for daily differential backups of large windows directory structures (Tcl) 2017-04-10T13:51:58-07:00John Brearleyhttp://code.activestate.com/recipes/users/4184423/http://code.activestate.com/recipes/580779-diff_copytcl-utility-for-daily-differential-backup/ <p style="color: grey"> Tcl recipe 580779 by <a href="/recipes/users/4184423/">John Brearley</a> (<a href="/recipes/tags/backup/">backup</a>, <a href="/recipes/tags/daily/">daily</a>, <a href="/recipes/tags/tcl/">tcl</a>). </p> <p>When you have terrabytes of data with 100,000+ files, it is no longer practical to blindly copy the entire data structure on a daily basis. I wrote this utility diff_copy.tcl to sort out what has been changed/updated and what new files have been added and only copy the changed &amp; new items. If the date/time of the source file is newer, the file will be copied. If the date/time of the source file is the same as the destination, the file sizes in bytes are checked to decide if a copy is necessary. If the source file is not present on the destination directory, the file is copied. There are options to remove old files from the destination directory or show what would be copied, but not actually do the copy.</p> Sample script for TCL socket load distribution across many CPUs / hosts (Tcl) 2012-11-29T17:27:20-08:00John Brearleyhttp://code.activestate.com/recipes/users/4184423/http://code.activestate.com/recipes/578351-sample-script-for-tcl-socket-load-distribution-acr/ <p style="color: grey"> Tcl recipe 578351 by <a href="/recipes/users/4184423/">John Brearley</a> (<a href="/recipes/tags/distribution/">distribution</a>, <a href="/recipes/tags/load/">load</a>, <a href="/recipes/tags/socket/">socket</a>, <a href="/recipes/tags/tcl/">tcl</a>). </p> <p>Here is a demo script for others to reuse / learn from. The server process hands out work assignments to multiple children process to do load balancing across multiple CPUs / hosts. The children process in this sample script dont do any real work, but occasionally create an error to demonstrate the error handling and recovery. Enjoy!</p>