Article View: news.software.readers
Article #260232I might strike "Brc.EXE" ( and its "pcre.DLL" ) from the list.
From: Jeff-Relf.Me
Date: Sat, 30 Apr 2016 22:53
Date: Sat, 30 Apr 2016 22:53
105 lines
5280 bytes
5280 bytes
<h2><PRE Style='Font-Family: OCR A, monospace !important;'>
The DOS Console tools I add to my Win8 system
are interesting to me, so I posted them.
No one cares if you (MickeyVarney) liked it or not.
Tune me out, and tune in something else, if you want.
Selecting what to read is _your_ job, not ours.
I might remove "Brc.EXE" ( and its "pcre.DLL" ) from my system
because I wrote some Visual C++ code for that; to wit:
// From "X.CPP" in "http://Jeff-Relf.Me/X.ZIP"
typedef wchar_t wchar ; typedef wchar *LnP, Ch0, Ch, Ch2 ;
LnP SubDir ; wchar PathBuf[444];
#define LOOP while(1)
#define While( ↻ ) Ch = 1, P-- ; \
while( ( Ch0 = Ch ) && ( Ch = *++P, Ch2 = !Ch ? 0 : P[1], ↻ ) )
#define WhileBac( ↻ ) \
Ch = Ch2 = 0, E ? 0 : E = B + szStr( B ), P = E ; \
while ( P >= B && ( Ch2 = *P, ( Ch = --P < B ? 0 : *P ) && ( ↻ ) ) )
inline int isLowr( int Ch ) { return Ch >= 'a' && Ch <= 'z'; }
inline int isUppr( int Ch ) { return Ch >= 'A' && Ch <= 'Z' ; }
inline int isAlpha( int Ch ) { return isLowr( Ch ) || isUppr( Ch ) ; }
inline int isDigit( int Ch ) { return Ch >= '0' && Ch <= '9' ; }
void CleanFile( int Deep ) {
int AnEXT, GoodEXT, Sz, s00e00, Dirt, Tries, Fail, OnWord ;
LnP _fNam, fNam, D, B, P, E ; wchar To[444], EXT[44];
E = 0, AnEXT = Dirt = Tries = OnWord = 0, B = P = fNam = SubDir ;
WhileBac( Ch )
if ( Ch == '.' ) { AnEXT = P < E - 1, E = P ; break ; }
GoodEXT = !AnEXT || E > B + 2 && E[-2] == 32 && isUppr( E[1] );
Str( EXT, L"%s", E ), Up_Str( EXT );
if ( B = P = fNam, E > B + 3 && isDigit( B[0] )
&& isDigit( B[1] ) && !isDigit( B[2] ) ) P += 2 ;
While( Ch <= 32 || Ch == '.' || Ch == '-' || Ch == '_' );
Dirt = P > fNam, _fNam = P ;
// #define DropArtist( Artist ) ( Sz = szStr( Artist ), \
// !EqN( Artist, _fNam, Sz ) ? 0 : ( Dirt = 1, _fNam += Sz ) )
//
// If it had (exactly) two leading digits ("10. -- "),
// it's gone now.
// DropArtist( L"[ Suuns ]-" );
if ( D = To, Deep ) D += Str( D, L"%s/", UglyDir );
B = P = D ;
D += Sz = Str( B, L"%.*s", int( E - _fNam ), _fNam ), E = D ;
While( Ch )
if ( Ch == '.' || Ch == '_' || Ch == '-' )
Dirt = 1, *P = 32, OnWord = 0 ;
else if ( !( isAlpha( Ch ) || Ch == '\'' || Ch >= 128 ) )
OnWord = 0 ;
else if ( !OnWord )
OnWord = 1, s00e00 = isDigit( Ch0 ) || isDigit( Ch2 ),
!s00e00 && isLowr( Ch ) && !EqN( P, L"of ", 3 )
? ( Dirt = 1, RaisC( P ) )
: s00e00 && isUppr( Ch )
? ( Dirt = 1, *P = tolower( Ch ) ) : 0 ;
if ( !Dirt && !Deep && GoodEXT ) return ;
LOOP {
!Tries
? Str( E, GoodEXT ? L"%s" : L" %s", EXT )
: Str( E, L" [%d] %s", Tries, EXT ), Tries++ ;
if ( Fail = _wrename( fNam, To ), !Fail ) break ; }
Sh( L"ReName (%s):\n %s >> %s\n\n", PathBuf, fNam, To ); }
void _CleanDir( LnP eParent ) { LnP ePath ; DirA
if ( EqN( SubDir, L"zzz", 3 ) ) return ;
ePath = eParent, ePath += Str( eParent, L"/%s", SubDir );
#define CleanDir( Deep ) \
if ( CD( PathBuf ), DirI( L"*", 0 ) ) \
LOOP { gF_Nam SubDir = FF_Rec.cFileName ; \
!Is_a_Dir ? CleanFile( Deep ) : _CleanDir( ePath ); }
CleanDir(1) *eParent = 0, CD( PathBuf ), SubDir = eParent + 1 ;
Sh( L"DEL DIR (%s):\n %s\n\n", PathBuf, SubDir );
Delete_Dir( SubDir ); }
...........
if ( Eq( Hit, L"CleanDir" ) ) {
// The "CleanDir" toolbar button was hit.
//
// Traverse "UglyDir" and it's subdirectories, recursively,
// to "clean" ( pretty up ) fileNames.
// SubFolders (other than "zzz") end up deleted.
DirA LnP ePath ; SubDir = 0 ; ClearScreen ;
ePath = PathBuf, ePath += Str( ePath, L"%s", UglyDir );
CleanDir(0) CD( StartDir ), Sh( L"'%s' got Cleaned.", UglyDir );
return ; }
Technical Details
Message-ID:
<Jeff-Relf.Me@Apr.30{3.53P.Seattle.2016}>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.advocacy.(1483839).mbox.7z!not-for-mailReferences:
<D3497A43.716D8%usenet@gallopinginsanity.com> <ng1mra02k95@news7.newsguy.com> <D349AE08.716FA%usenet@gallopinginsanity.com> <Jeff-Relf.Me@Apr.30{3.02A.Seattle.2016}> <ng2g0q11r7a@news6.newsguy.com>Show Full Headers
Complete Article Headers
Message-ID: <Jeff-Relf.Me@Apr.30{3.53P.Seattle.2016}>
Subject: I might strike "Brc.EXE" ( and its "pcre.DLL" ) from the list.
Date: Sat, 30 Apr 2016 22:53:04 +0000
From: Jeff-Relf.Me <@.>
References: <D3497A43.716D8%usenet@gallopinginsanity.com> <ng1mra02k95@news7.newsguy.com> <D349AE08.716FA%usenet@gallopinginsanity.com> <Jeff-Relf.Me@Apr.30{3.02A.Seattle.2016}> <ng2g0q11r7a@news6.newsguy.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.os.linux.advocacy.(1483839).mbox.7z!not-for-mail
Newsgroups: comp.os.linux.advocacy,sci.physics,news.software.readers
Organization: Glorb Internet Services, http://www.glorb.com
Lines: 105
NNTP-Posting-Host: /zlDkqjrFG1Uj/denlv3LA.172.posting.glorb.com
Content-Type: Text/HTML; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@glorb.com
NNTP-Posting-Date: Sat, 30 Apr 2016 22:53:03 +0000 (UTC)
User-Agent: Jeff-Relf.Me/X.ZIP
X-Notice: Scanned by Mr. Bill
X-Received-Body-CRC: 131658980
X-Received-Bytes: 5153