Declined Enhanced file comparisons

May 20, 2008
3,515
4
Elkridge, MD, USA
1/ Size and content comparison
A new function @COMPAREX[] would return the numeric values shown below
if both files are accessible, but would report accessibility problems
through its return value instead of reporting a system error on STDERR:
return condition
-3 neither file is accessible
-2 file 1 accessible, file 2 not accessible
-1 file 1 not accessible, file 2 accessible
0 both files accessible and have identical sizes and contents
1 both files accessible, but file 1 larger, hence contents different
2 both files accessible, but file 2 larger, hence contents different
3 both files accessible, and have identical sizes, but contents are
different

2/ Age comparison
A new function which would compare the ages of two files, returning
numeric values as follows:
return condition
-3 neither file 1 nor file 2 exists
-2 file 1 exists, file 2 does not exist
-1 file 1 does not exist, file 2 exists
0 both files exist and have the same age
1 both files exist and file 1 is older
2 both files exist and file 2 is older

I could also utilize a function which combines the two functions above
using additional return codes for each possible combination, e.g. by adding
4 or 8 to the first function's value if file 1 or file 2 is older, resp.
Value 0 would mean same age and content...

All of these functions would serve the user in the maintenance of
multiple file systems, backing up or updating, in MAKE type operations, etc.
--
Steve
 
Similar threads
Thread starter Title Forum Replies Date
S Declined Enhanced @FILE for COPY, DESCRIBE, MOVE, RENAME, SYNC, TOUCH /R Suggestions 0
rconn Enhanced Plugin SDK Suggestions 0
Roedy Done Enhanced FFIND Suggestions 1
S Done Enhanced CASE values in SWITCH Suggestions 29
S Declined Support for Enhanced Deflate in ZIP Suggestions 1
S Done Enhanced ALIAS, SET, ESET and FUNCTION commands Suggestions 0
S Done Enhanced activity logging Suggestions 0
S Done Enhanced date and time range specifications Suggestions 0
S Done Enhanced TYPE command Suggestions 9
S Done Enhanced FUNCTION and ALIAS definition syntax Suggestions 0
S Declined Enhanced "wipe" and recycling Suggestions 2
S Declined Enhanced redirection Suggestions 0
S Declined Enhanced SHORTCUT command Suggestions 0
Joe Caverly Link in Help File to Blog Articles Suggestions 0
Joe Caverly Declined Use ADS file with TOAST Suggestions 1
vefatica File name completion at the beginning of the command line Suggestions 6
Joe Caverly Done @FILESIZE and NTFS File Stream Suggestions 1
Joe Caverly Determine if a file is on an SSD drive Suggestions 5
Joe Caverly Declined Debug without first saving to a file Suggestions 3
R Declined File Explorer enhancement request Suggestions 8
D Secondary shells should not search for - but reuse - the current configuration file. Suggestions 11
Joe Caverly Declined Update FFIND in Help File with example for ORing expressions to search for Suggestions 6
D Done Re-activate the [secondary] section in the ini-file Suggestions 0
x13 Done Typo in help file (including PDF) | v24.02.46 Suggestions 0
R Declined wish-list: add a command to copy a file to clipboard. Suggestions 17
M Done Parameter to ignore [Escape] for FFIND /T"XXX" in a file Suggestions 5
Joe Caverly Done File completion for LIBRARY commands Suggestions 1
vefatica Declined Enhance file name completion Suggestions 4
D Declined File Explorer Suggestions 2
R Declined Install option: Add File Explorer Run As Adminstrator option Suggestions 14
mfarah Done TCEDIT: show the full name (with drive and path) of the active file on the title bar. Suggestions 3
R User-created extended help (probably in a text file): DIRHISTORY /?x Suggestions 10
Joe Caverly Declined Help File "See Also" Suggestions 4
thorntonpg Done Goto folder in file explorer from the current directory in the tcc prompt Suggestions 7
rconn add support for batch file projects Suggestions 0
rconn Done map the registry as a file system Suggestions 0
rconn Declined Help file organization Suggestions 0
rconn Done extend tcc file format Suggestions 0
K_Meinhard File descriptions for Explorer etc. Suggestions 1
J Directory Aliases and file:// Suggestions 0
M Done Verify validity of file name and/or path... Suggestions 2
G Declined Add option to turn on file name case sensitivity Suggestions 6
Stefano Piccardi Declined enhance FOR and DO with hexadecimal @file reading Suggestions 0
Joe Caverly Declined NTFS File Streams and ZIP Suggestions 12
M Declined Function to to verify file name validity... Suggestions 4
J Declined Suggestions for file size display Suggestions 0
S Done Automatic quoting of directory and file names Suggestions 0
S Declined File timestamp based dates in file date selection ranges Suggestions 0
C Done "extended" icon display in file-view Suggestions 0
S Done File matching enhancements Suggestions 1

Similar threads