Horst's
English German


Don't follow leaders
Horst Schaeffer's Software Pages
DelAge32 2.4 Delete or move files by age Download (15Kb)
DelAge32 deletes or moves files with a mimimum age given by the number of days.

Syntax:   DelAge32 filespec days [options]

The files are specified by search pattern (e.g. *.* for all files), with relative or absolute path.

Options include: /recurse (subdirectories), /subonly (excluding initial directory), /includeRO, /includeH, /includeS, /rd (remove empty subdirectories), /move target, /created (use "created" time stamp instead "last modified"), /accessed ..

Example:   DelAge32 "C:\some\where\*.*" 100 /recurse

Deleted files are listed with age (number of days). The output can be redirected to a file.
With option /preview the action can be safely tested without actually deleting or moving files.

More info..
 
WasFile 2.2 Compare file time&date Download (6Kb)
WasFile compares ..
.. time&date of two files (or directories),
.. the date of two files, time ignored
.. the date of a file with today-n (days)
.. time&date of a file with now-n (minutes)
Examples:
WasFile this.zip created before that.zip
WasFile this.zip modified after today-8
WasFile this.dat created before now-10
Using file stamps for created, modified (default) or accessed;
comparison: [not] before|after|sametime

Option to compare date only, ignore time: /DateLocal or /DateUTC

Result by errorlevel: 0: true, 1: false, 255: error (message to STDERR)

 
CSVsort 1.22 CSV list sort Download (28Kb) | 64 bit (35Kb)
CSVsort is a console sort tool for CSV lists.

Features:
  • Multiple sort criteria: sort by multiple fields with individual sort options
  • Two programm versions: Sort als ANSI (byte) or Unicode (2-byte characters)
  • List file: ANSI or UTF-8/16 accepted (internal conversion if necessary)
  • Sort options:
    ascending or descending order, handling of regional characters (, , , ..) and special symbols, case ignore, numeric sort (right alignment)
  • Command options:
    separator character; fields in (double) quote marks; header lines (remain untouched); output elapsed time
  • Fast in-memory linked list merge sort with comparison callback; 32 or 64 bit
Command example:     CSVsort.exe MyList.csv Product.csv /s9 /i+1 /r-3 /H1
 
IniFile 1.6 INI File Tool Download (6Kb)
IniFile handles Windows type INI files with section names in square brackets, and assignments of the form: item=string.

Syntax:

INIFILE filename [section] item=string change or write
INIFILE filename [section] item= remove item
INIFILE filename [section] item== clear item
INIFILE filename [section] /remove remove entire section
INIFILE filename [section] item > temp.bat read item
INIFILE filename [section] > temp.bat read all items of section

Items and sections are generated if not found. The INI file must exist.

Reading an assignment sends a SET statement to STDOUT, which can be redirected to a temporary batch file, or processed with a FOR /F construct.
 
ClipText 2.0 Copy text from Clipboard to file v.v. Download (6Kb)
ClipText copies plain text from the Clipboard to a file or from a file to the Clipboard.
Examples:
ClipText to "My File.ext"
ClipText from %temp%\my.txt
In case a text file with OEM (console) characters is to be read or written, option /OEM ensures that extended ASCII characters are handled properly.

Text can be appended to the Clipboard or to the file with the /append option.
 
Wait 1.01 Stop and wait Download (5Kb)
Wait stops execution of a console script and waits (number of seconds); cancel waiting by key possible.
Examples:
Wait 5
Wait 9.5 ESC "ESC to continue"
 
CoColor 1.0 Change console color Download (5Kb) | 64 bit (6Kb)
CoColor changes the console color for the succeeding console output, not for the entire window, like the built-in COLOR command. CoColor uses the same color codes as COLOR.

CoColor also accepts a sequence of color codes and text strings (each in double quote marks), making it a colorful Echo replacement.

Demo.CMD is included
 
CMDfocus 1.1 Console window to foreground Download (4Kb)
CMDfocus brings the current console window to the foreground with keyboard focus.
CMDfocus also offers an option to minimize the console window

When a batch is running in the background or minimized, and you want to see the results when the job is done, insert CmdFocus followed by PAUSE. This will bring the console window to your attention, and allow any key to continue the batch (to close the console, for example).

Options: /beep /center /min