 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jim Davis Guest
|
Posted: Sun Apr 29, 2007 8:10 am Post subject: File renaming - Wildcard5 spec |
|
|
Wildcard5 - Bulk file renaming spec - 2007 April 28
If you read the following , please post improvements .
Wildcard5 is a Windows file rename process ,
useful for renaming many files at once .
It uses the 2 familiar wildchars *? and 3 new wildchars <>|
None of the 5 wildcards are legal in Win filenames .
Two patterns are input to Wildcard5 :
WildOld - case-insensitive match the Original filename
WildNew - case-sensitive format the Renamed filename
The 2 familiar wildchars *? can occur in either WildOld or WildNew .
The 3 new wildchars can occur in only one of WildOld or WildNew :
< (Insert) - can be used only in WildOld
| Quote: | (Delete) - can be used only in WildNew
| (Stuff) - can be used only in WildNew |
triggers text supplying event of calling program .
WildOld is not case sensitive , WildNew is case sensitive .
Same number of tokens (wildchar or text) are required in WildOld & WildNew .
Parsing moves left to right thru tokens in WildOld & WildNew ,
considering each WildOld,WildNew token pair .
Several WildOld,WildNew token pairs are illegal .
In both patterns , two wildcards touching is often illegal ,
however , examples (3) & (4) below show legal wildcard touching .
Text (T in token patterns) is delimited by wildchars *?<>|
EXAMPLES ----------------(1)----------(2)-------(3)-----------(4)--------
WildOld is*.* ?i.Doc <*.TXT *gg??.h
WildNew was*.* ?I.DOC SAM*.txt >gg??.H
FileName Original IS707.mp3 ai.doc 99.TXT rIPgg22.h
FileName Renamed was707.mp3 aI.DOC SAM99.txt gg22.H
WildOld token pattern T*T* ?T <*T *T??T
WildNew token pattern T*T* ?T T*T >T??T
Equal number of tokens 4 2 3 5
------------------------------------------------------------------------- |
|
| Back to top |
|
 |
Bruce Larrabee Guest
|
Posted: Mon Apr 30, 2007 1:26 am Post subject: Re: File renaming - Wildcard5 spec |
|
|
Hey Jim, I love this sort of thing but aren't
any 'improvements' in the eye of the beholder? Or
do you have some specific capabilities you are
striving for?
BTW, have you ever played with SED? (Stream EDitor)
Just curious...
Bruce |
|
| Back to top |
|
 |
Jim Davis Guest
|
Posted: Fri May 04, 2007 5:42 am Post subject: Re: File renaming - Wildcard5 spec |
|
|
| Quote: | BTW, have you ever played with SED ? (UNIX Stream EDitor)
|
Yes , isn't Wildcard9 prettier than SED ?
With the 4 daughters of question mark
: one char isdigit
" one char isalpha
/ one char isalnum
\ one char ~isalnum
The 4 daughters are available in a single directory ,
and look ugly only at first glance . |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|