Saturday, January 12, 2013

INFO iBOTH ANDROID AND WIN7: ni Files & checksums

http://corz.org/engine


http://corz.org/windows/software/checksum/checksum-tri Why an ini file?

Setting preferences is a task; work that you don't want to do again. This is true of most all software. So the first thing you want to be able to do with preferences, is make a backup. checksum.ini is a plain text file, so backup is trivially easy. checksum does NOT use, nor rely upon the Windows registry, so it's no problem to move your settings to a different machine, or use them after a system reinstallation. Being plain text, they are also easy to read and understand.Importantly, plain text preferences enable the developer - the guy most likely to understand the settings - to leave copiuous notage and comments right there above the preference itself. Plain text offers complete freedom to do lots of explaining, drop URLs, make diagrams, whatever, right where you need it, when you need it.It also means the developer (me) can freely add new features and settings without messing up any preference GUI you may or may not have gotten used to using, and it's trivial to upgrade your existing ini file whilst keeping all your old settings intact. Also, as it's work, and possibly you'll spend a few minutes doing it; you want to be in an environment you find comfortable, that is; your regular text editor. I could go on.So there we have it, perhaps not the most "user-friendly" preference system, but maybe the best for the kinds of users that will want to alter checksum's prefences, behaviours, inner workings, and so on. There is a lot that can be set.

Get a Text Editor..

The only possible barrier to your working with checksum's permanent preferences is lack of a decent text editor. You don't need anything fancy, so long as it works with plaintext, and does Syntax Highlighting. Notepad would work, technically, but without syntax highlighting, it will be almost impossible to distinguish comments from actual preferences, and not only will viewing be choreful, you are quite likely to make errors.Most modern text editors can do syntax highlighting which simply colours the text by what it is; comments are usually grey or light green. Syntax highlighting is the difference between this..[checksum] # Text Editor # # This is notes, see editor=notepad.exeand this..[checksum] # Text Editor # # This is notes, see editor=C:\path\to\cool\editor.exe

That's it!

Everything else you need to know is inside checksum.ini - drop it into your text editor!If you used checksum's installer, you can find checksum.ini here..C:\Documents and Settings\<Username>\Application Data\corz\checksum On Vista/Windows 7, it's here..C:\Users\<Username>\AppData\Roaming\corz\checksum If you are running in portable mode, it will be sitting right next to checksum.exe. You can also access checksum.ini by right-clicking checksum's Progress ToolTip or System Tray icon. For in-depth information about some of checksum's trickier preferences, see here.It's subliminal, baby!Better than Disk Space Pro! cks.php

Launch simple checksum with a file (via drag & drop, SendTo, etc.), and get an instant MD5 or SHA1 hash, ready to view or copy into your clipboard. simple checksum's new Auto.. menu enables you to automatically send your hashes to either your Windows® ClipBoard, or directly to a fresh .hash file, as part of one simple drag and drop. Switch algorithm (Alt-M or Alt-S) and with AutoSave enabled, you've got yourself a MD5+SHA1 MultiHash™ from a single drag and drop!Drop Two files, and simple checksum transforms into a simple, highly efficient file comparison utilty…

File Compare..

Drop Two files onto simple checksum; either the program itself (or a shortcut to it), or directly onto its input, and simple checksum will compare them, using your currently selected hashing algorithm. If the files are identical, you get "Files MATCH!", and if not, "Files DO NOT MATCH!", simple as that.If required, you can get to the actual hashes by hitting Alt-C. If the hashes were different, hitting Alt-C a second time will get you the second hash. From then on, Alt-C toggles between the two hashes. When comparing files, if AutoCopy is enabled, your clipboard will contain a mini-report, with the two file names, their individual hashes, and right at the top, the status of the file comparison; match or not.

Web Hash Compare..

If you drop a file onto simple checksum's input and there is already a hash in your clipboard, simple checksum will compare the hash of the dropped file with that in the clipboard and report whether or not they match (rather than report the hash string - if you need that, IT'S IN YOUR CLIPBOARD!)This makes it a no-brainer to compare the hashes of download files with the hashes published on web sites, simply copy the hash from the page (select it, hit Ctrl+C) and then drop the downloaded file into simple checksum. TADA! If you have the latest beta, this will also work on launch.It also means that you can compare the hashes of two files that are not physically next to each other; with Auto-Copy enabled, drag the first file into simple checksum - its hash is placed in the clipboard. When you drag-and-drop the second file, simple checksum will compare its hash to the one in the clipboard.NOTE: simple checksum will automatically switch between MD5 and SHA1 hashing depending on the type of hash in your system clipboard.NOTE: If you have Auto-copy-to-clipboard enabled, it will deactivate when comaring hashes with the clipboard, your original hash will still be there after the operation.

It's FREE!

simple checksum is FREE! (it is intalled along with checksum)

After a month or so, checksum will occasionally remind you that it is Shirtware, but simple checksum keeps on working without interruption, for life. En-joy! 

Get simple checksum.. with checksum!

http://corz.org/windows/software/checksum/checksum-tricks.php The basic checksum tasks..

Most people will simply install checksum, and then use the Explorer context (right-click) menu to create and verify checksums, rarely needing any of the "extra" functionality that lurks beneath checksum's simple exterior. After all, checksum is designed to save you time, as well as aid peace of mind. This is how I mostly use it, too.. 

Create checksums..

Right-click a file, the checksum option produces a hash file (aka. 'checksum file') with the same name as the file you clicked, except with a .hash extension (or .md5/.sha1, if you use those, instead). So a checksum of some-movie.avi would be created, named some-movie.hash (if you don't use the unified .hash extension, your file would instead be named some-movie.md5 or some-movie.sha1, depending on the algorithm used). Right-click a folder, the Create checksums.. option will produce a hash file in that folder, containing checksums for all the files in the folder (and so on, inside any interior folders), named after the folder(s), again, with a .hash extension, e.g. somefolder.hash 

Verify checksums..

Click (left-click) a hash file (or right-click and choose Verify this checksum file..), checksum immediately verifies all the hashes (.hash/.md5/.sha1) contained within. Right-click a folder, the Verify checksums.. option instructs checksum to scan the directory and immediately verify any hash files contained within.That's about it, and this simple usage is fine for most situation. But occasionally we need more.. 

checksum launch modifiers..

When you launch checksum, you can modify its default behaviour in two important ways. The first modifier is the <SHIFT> key. Hold it down when checksum launches, and you pop-up the one-shot options dialog, which enables you to change lots of other things about what checksum does next. This works with both create and verify tasks, from explorer menus or drag-and-drop. Here is what the one-shot create dialog looks like.. Hit the modifier key as soon as checksum launches, in other words, hit the <SHIFT>/<Ctrl> key right after you choose the Explorer menu item, or let go of a drag & drop, and so on. Hold the key down until checksum appears a moment later.In there, as you can see, you can set all sorts of things. Hover over any control to get a Help ToolTip (you might need to repeat that to read the entire tip!). You can also drag files and folders directly onto that dialog, if you want to alter the path setting without typing. Same for the verify options.The file mask: input is, by default, *.*, which means "All files", "*" being a wildcard, which matches any number of any characters. You can have multiple types, too, separated by commas. For example, if you wanted to hash only PNG files, you would use*.png; if you wanted to hash only text files beginning with "2008", you could use 2008*.txt, and so on.If you click the drop-down button to the right of the input, you can access your pre-defined file groups, ready-for-use (you can easily add to/edit these in your checksum.ini)..NOTE: If you drop a file onto the create options, the path is inserted into the path: input, and though the file mask remains *.*, the file name is also automatically added to the file mask drop-down, just in case you really do wish to only hash a single file. 

The second modifier is the <Ctrl> key. Hold it down when checksum launches and you force checksum into verify mode, that is to say, no matter what type of file it was, you instruct checksum to treat it as a hash file, and verify it. This works with drag-and-drop too, onto checksum itself, or a shortcut to checksum. checksum's default drag-and-drop action is to create hashes. Amongst other things, this is useful for verifying folders in portable mode, simply Ctrl+drag-and-drop the folder directly onto checksum (or a shortcut to it), and all its hashes will be immediately verified.  

batch processing..

hashDROPA batch-processing front-end for checksum..

Because checksum can be controlled by command-line switches, it's possible to create all sorts of interesting front-ends for it. The first of these to come to my attention, is a neat wee application called "hashDROP", which enables you to run big batches of jobs through checksum, using a single set of customizable command-line switches.As developer seVen explains on the hashDROP page..hashDROP is a front-end for checksum which enables you to queue a bunch of jobs (files/folders) and then pass them all through checksum with your own custom switches in one batch process.On seVen's desktop, at least, it looks something like this.. hashDROP has already earned a place in my SendTo menu. Good work, seVen! For more information, documentation, and downloads, visit the hashDROP page. 

Batch RunnerRun multiple programs in a batch..

I originally designed Batch Runner to run a big batch of tests on checksum before release, but it has since proven useful for other tasks, so I spruced it up a bit, made it available. If you want to run loads of hashing jobs using the same switches, hashDROP is probably more useful to you. But if you want to run lots of checksum jobs with differentswitches, or as part fo a larger batch of jobs involving other programs, then check out Batch Runner. Batches can be saved, selected from a drop-down, run from the command-line, even from inside other batches, so it's handy for repetative scheduled tasks, or application test suites, as well as general batch duties. At least on my desktop, it looks like this..


Custom Explorer Context Menu Commands made easy..

On the subject of music files, you may encounter a lot of these, and fancy creating a custom explorer right-click command along the lines of "checksum all music files", or something like that. No problem; you can simply create a new command in the registry, add the "m" switch add your file masks, right?But what if you change your file masks? Perhaps add a new music file type? Do you have to go and change your registry again? NO! checksum has it covered. Instead of specifying individual file masks, use your group name in the command, e.g. m(music) and checksum applies all the file masks from that group automatically, so your concept command is always up-to-date with your latest preferences.Here's an example registry command that would do exactly that. Copy and paste into an empty plain text file, save as something.reg, and merge it into your registry. If you installed checksum in a different location, edit the path to checksum before you merge it into the registry (not forgetting to escape all path backslashes - in other words, double them)..Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\01b.checksum music] @="Checksum &MUSIC files.." [HKEY_CLASSES_ROOT\Directory\shell\01b.checksum music\command] @="\"C:\\Program Files\\corz\\checksum\\checksum.exe\" crm(music) \"%1\"" NOTE! If you add a "3" to the switches [i.e. make them c3rm(music)] you'll get a media player album playlist files created automatically along with the checksum files. Groovy! Here's one I prepared earlier.

Setting new default Explorer context actions..

You can also change checksum's default  Explorer commands, as well as add new commands, without going anywhere near the registry. Simply edit the installer's setup.ini file, [keys] section. For example, to always bring up the one-shot options dialog when creating checksums on folders and drives, you would add an "o" to those two commands..HKCR\Directory\shell\01.|name|\command="|InstalledApp|" cor "%1"HKCR\Drive\shell\01.|name|\command="|InstalledApp|" cor "%1"Then run checksum's installer (setup.exe), and install/reinstall checksum with the new options. From then on, any time you select the "Create checksums.." Explorer context menu item, you will get the one-shot options dialog. If you would prefer to synchronise hashes under all circumstances, add a y, and so on. 


checksum as an installer watcher..

Because checksum can so accurately inform you of changes in files, it can function as an excellent ad-hoc installer watcher. All you do is create a root checksum for the area you would like to watch. Run the installer. And afterwards, verify the checksum. If anything has changed, checksum will let you know about it, with the option to log the list to funky XHTML or plain text.Similarly, checksum can be utilized in any situation where you need to know about changed files. You can even use it to compare registry files, one exported before, the other after an install or other process. If the hashes match, there's no need to look further. 

checksum's custom command-line switches..

Click & Go!  is the usual way to operate checksum; but checksum also contains a lot of special functionality, accessed by the use of "switches"; meaningful letter combinations which instruct checksum to alter its operation in some way. If you have some unusual task to accomplish, the one-shot options dialog enables you to manipulate the most common switches with simple checkbox controls. You can see the current switches in a readout, updating dynamically as you check and uncheck each option. But this output is also an input, where you can manipulate the switches directly, if you wish. If that is the case, you will probably find the following reference useful.You may also find this section useful if you are constructing a full checksum command-line for some reason, maybe a Batch Runner command or batch script, or custom front-end for checksum, or altering your explorer context menu, or creating a scheduled task, or something else. In each case, switches are placed before the file/folder path, for example; the full command-line to verify a checksum file might look like this.. C:\Program Files\corz\checksum\checksum.exe v C:\path\to\file.hashHere are all the currently available switches:cCreate checksums. vVerify checksums. rRecurse (only for directories). ySynchronize (add any new file hashes to existing checksum files). iIndividual hash files (one per file). sCreate SHA1 checksums (default is to create MD5 checksums). uUPPERECASE hashes (default is lowercase). mFile masks. Put these in brackets after the m. e.g.. m(*.avi,*.rm)Note: You can use your file groups here, e.g. m(music) eAdd file extensions to checksum file name (for individual file hashes).. 1Create one-file "root" checksums, like Linux CD's often have.  3Create .m3u playlists for all music files encountered (only for folder hashing).. pCreate .pls playlists for all music files encountered (only for folder hashing).. qQuiet operation, no dialogs (for scripting checksum - see help for other options).. hHide checksum files (equivalent to 'attrib +h').  oOne-shot Options. Brings up a dialog where you can select extra options for a job.(to pop up the options at run-time, hold down the <SHIFT> key) bBeeps. Enable audio alerts (if disabled in your prefs - override it). tToolTip. Enable the progress ToolTip windoid (if it is disabled in your prefs - override it). nNo Pause. Normally checksum pauses on completion so you can see the status. This disables it.(note: you can also set the length of the pause, in your prefs) kAbsolute Paths. Record the absolute path inside the (root) checksum file.Use this only if you are ABSOLUTELY sure the drive letter isn't going to change in the future.. fLog to a file (if there are failures, checksum always gives you the option to log them to a file) gGo to errors. If a log was created; e.g. there were errors; open the log folder on task completion. lLog everything. (the default is to only log failures, if any). aOnly verify these checksum files.(followed by algorithm letter: am for MD5, as for SHA1 - see example below).  The 'a', 'f', 'g', 'l', and switches only take effect when verifying hashes. The '1', '3', 'e', 'h', 'i', 'k', 'm', 'o', 'p', 's', 'u', and 'y' switches only take effect when creating hashes.In other words..global switches = b, n, o, q, r, t.creation switches = 1, 3, c, e, h, i, k, m, p, s, u, y.verify switches = a, f, g, l, v.Switches can be combined, like this..… checksum.exe v "C:\my long path\to\files.md5"[ note 'long' path (with spaces) enclosed in "quotes" ] … checksum.exe crim(movies) c:\downloads[ create individual checksums for all my movie files - note use of group name ] … checksum.exe vas c:\archives[ check all *.sha1 files in the path, not *.md5 files ] … checksum.exe c3rm(music) p:\audio[ recursive music file checksum creation, with automatic playlists ] … checksum.exe cr1m(*.zip) d:\[ create a "root" checksum for all zip files on drive D: ]  




  You can simply run a normal Create checksums.. Explorer context menu command on the folders on the DVD drive. Because it's read-only, checksum will create a folder on your desktop (or other chosen location) and create any .hash files in there. The entire structure will be recreated, so you can simply drag and drop the whole thing over to the copy, if need be. Verify normally with the Verify checksums.. command.Remember, if you have already hashed the copy, you will need to rename one of the (sets of) .hash files or else copying over the directory structure will overwrite the copy's.hash files! So it's best to simply begin with hashing the DVD. If all goes to plan and there are no errors when you copy the .hash files over, your DVD .hash files can become your copy's .hash files! Job done!checksum has a number of configurable methods of dealing with read-only fallback conditions, as well as a myriad of configurations for .hash file naming, so if this is something you do a lot, you will probably want to drop checksum.ini into a decent text editor (one with syntax highlighting) and have a scroll. By the way, nice shirt! 

notes:

The order of the switches isn't important, though the m switch must always be immediately followed by the file masks (in brackets), e.g. m(*.avi), and the a switch must  be the first letter of a two letter combination, e.g. am You don't need to specify the m(music) switch to create playlists, only the 3. A command like checksum.exe rc3 "P:\audio" would create checksums recursively for all  files in the path p:\audio, whilst creating playlists for only  the music file types. Nifty, huh?Most of these switches also have a preference inside checksum.ini. If that preference is enabled, you can disable it temporarily by prepending the switch with a - (minus) character, e.g. to disable the Progress ToolTip, use -tAny of these switches can be easily added permanently to your Explorer right-click (context) menus. For instance, you may like to always use the one-shot options, without having to hold the SHIFT key every time. So simply add an o, and it will be so. See herefor details of how to permanently alter checksum's Explorer context menu commands.And remember, if there's some specific behaviour that you want set permanently, you can do that, and a lot more, inside checksum.ini.. 

checksum.iniworking with checksum's UNIX-style preference file..

checksum has a lot of available options. Here is a page that will help you get the most out of them. 

I do requests!

If there's something you would like to accomplish with checksum, but don't know how; feel free to demand an answer, below..  





1 comment:

  1. HOW TO FIND AND OVER RIDE INI FILES

    Finding checksum.ini..

    Because checksum can run in a number of configurations, checksum.ini isn't always in the same place. The easiest way to get to checksum.ini, is from inside checksum. During any checksum operation, you can get to checksum's ini file via the ToolTip's context (right-click) menu as well as from checksum's system tray menu (right-click the checksum icon) selecting the Edit Prefs (checksum.ini) option.If you want to get to it from Explorer, see here for instructions - a page all about checksum.ini 

    Overriding checksum.ini settings..

    Some of the permanent settings also have a switch, which is a simple character, usually a letter, that you can pass to checksum by adding it to the command-line (via a Run dialog, script, front-end, etc.).Those settings can also be disabled  temporarily by prepending the switch with a -(minus) character. For example, by default, the progress tooltip is enabled inside checksum.ini..progress_tip=truebut you could add -t to your switches to disable it temporarily.If it was disabled  inside checksum.ini..progress_tip=falseyou could enable it temporarily, by passing t in your switches. And so on.For a full list of checksum's available command-line switches, see here.



















    ReplyDelete