A problem with the SafeChars Plugin...

May 24, 2010
Northlake, Il

Thank you for taking the time to do that!!! However, two points:
...sorry to report that your version doesn't correctly unquote the test string that I indicated in my previous post. It works fine with more standard strings, but commas and possibly other characters confuse your version.
In the case of commas the above statement is simply not true: Example (from my previous e-mail):
:: 2: Extraneous white space and commas and an invalid character enclosed in double quotes
     when invoking @UnSafeQuote
Before UnSafeQuoting: "A    string    with  extraneous  white  space, commas, & an invalid character enclosed in double quotes"
 After UnSafeQuoting: A    string    with  extraneous  white  space, commas, & an invalid character enclosed in double quotes
There are commas in the above string, and they are handled correctly. This is simply because the batch file has "UnSafe /E:, >NUL:" at the top (and "UnSafe /R >NUL:" at the bottom), and I would assume that the solution that I used for commas would work for any other "problem" characters, although I'm not actually aware of any others that would cause a problem in the first place because, among other things, they are characters that have never caused a problem up to now and I'm not going to take the time (I am very slow) to find out if there actually are any other characters because if another character were to "pop up" (something I actually consider to be quite unlikely), "extending" the "UnSafe /E:, >NUL:" command to include those extra characters would be quite trivial, of course, probably taking less than five minutes to do (even for me!).

So I really don't care if my function is the absolutely "best" solution because I know, for an absolute fact after extensive testing (I only included the "high points" in my original posting on the matter), that my function works and that if I forget it I will have enough information to find it where I have previously used it; real-world example:
[Z:\](Find /I "unsafe" *.btm & For /D /R . %D in (*) Do (For %F in  ("%D\*.btm") do
 (Find /I "unsafe" "%F"))) | List
| List
and results of same (considerably "cut down from the "reality"):
---------- 7ZA.BTM

UnSafe /E:, >NUL:
UnSafe /Z >NUL:




UnSafe /E:, >NUL:
   UnSafe /Z >NUL:


---------- BURNDVDFROMFILELIST.V2012-01-01-02-19.BTM
   UnSafe /E:, >NUL:
   UnSafe /Z >NUL:


UnSafe /E:, >NUL
   UnSafe /Z >NUL:
   UnSafe /Z >NUL:

---------- CONSOLIDATE7ZFILELISTING.V2011-12-21-01-03.BTM
UnSafe /E:, >NUL
   UnSafe /Z >NUL:
   UnSafe /Z >NUL:

---------- Z:\DOIT\DOIT.BTM
UnSafe >NUL: /E,
   UnSafe >NUL: /Z

---------- Z:\DOIT\DOIT.V2011-10-20-12-57.BTM

---------- Z:\DOIT\DOIT.V2011-10-20-21-09.BTM

---------- Z:\DOIT\DOIT.V2011-10-21.BTM

UnSafe /E:, >NUL:
UnSafe /R >NUL:

UnSafe /E:, >NUL:
UnSafe /R >NUL:

Notice that the above searches for a string in both the current directory and its subdirectories, so that's not a problem; and since I do all of my "development" on my Z: drive (a RAM disk), speed is not at all an issue either (the above probably took 30 seconds to do including the time it took me enter the command in the first place). (And if there's a "better" way to do it ("FFind", for example, which I know absolutely nothing about) I really couldn't care less because cutting something down from 30 seconds to 10 seconds is not enough of an improvement - in fact, at 30 seconds there is absolutely nothing that could be enough of an improvement) for me try to take the time to try to "learn" it!) I will also add the I have a batch file that I can use in a "pipe" that will entirely eliminate those files whose names contain "version" information of some kind (".V20yy-mm-dd", *-1.btm, *-2.btm, *+1.btm, etc. etc. etc.) if that is what I want (I almost never do want that in this situation).

And I actually "automated" the above "procedure" some time ago, but since I probably do it a dozen times or more in the typical day because I am so absolutely dependent on "how did I do that last time?" for what I want to do now that I really no longer have to really even "think" about how to do the above so I find it just as quick to do it by hand (I may have mentioned this before, but in the (now somewhat distant, I suppose) past I was a very fast typist, and I ain't all that slow now). And I will add that remembering something as simple and uncomplicated and straightforward as the above is not at issue; while my memory is certainly bad, "concepts" "stick around" longer than "facts"; and with sufficient repetition (as I said, probably a dozen or more times in a typical day) even I can remember almost anything.

As far as the regular expression is concerned, I have no doubt whatsoever that that is a good solution for you, but for me it is simply not. This is because, due to my often previously mentioned bad memory issues, learning something "new" is just on the edge of being impossible (and I have a multitude of strategies that help me; I don't actually have to remember beforehand that there is "something about that" because I know how to quickly find a previously-documented solution to a past occurrence of the "that" if it occurs (and if this is not the first time that "that" has happened, of course; but I religiously document everything of this nature) and therefore apply the previously-documented solution and "remove" the problem. Whole process probably take me less than 5 minutes; including the "fix" since I can, of course, use copy and paste.

So the bottom line is that a "good" solution that I can remember based on knowing what to look for and how to find is far better than a (slightly!) better one where that is not the case.

And I'm not at all trying to discourage you (or anyone else for that matter) from suggesting ideas of this nature; if I do, in fact, find them to be substantially better than what I am currently doing I will incorporate them (again, that is not the case for your "solution" pretty much completely because of my bad memory and the fact that the syntax of the regular expression is not trivial (for me!); whereas my function, in my opinion, is); and other people looking at this bulletin board may find them useful even if I do not so they are probably worth it on that basis alone. (I don't know if you've ever noticed, but the number of people who a least look at these things is pretty amazing.)

And, finally, I really do appreciate the fact that you took the time to enter those postings! Thank you, again!!!! :)

- Dan
Similar threads
Thread starter Title Forum Replies Date
jfalch Problem with 4utils64 in v21 Plugins 5
M Annoying "Event64" Problem... Plugins 15
M (Stupid?) Problem with 64-bit 4Utils plugin... Plugins 3
C FIXNAMES problem Plugins 9
S How to? 4autotray problem Plugins 6
Frank Problem with MkVer Plugins 7
C Problem with FixNames plugin Plugins 9
C FixNames problem? Plugins 22
Timothy Byrd Problem with DELAY in RB_Utils in v9 Plugins 1
M How to? Use SafeChars plugin... Plugins 2
dcantor Error in SAFECHARS plugin v 1.9.0 Plugins 2
thedave SafeChars: Escaped version of @unsafe Plugins 7
M SafeChars plugin misbehaving... Plugins 3
S How to? SafeChars.dll question Plugins 4
dcantor Suggestion for SafeChars plugin Plugins 7
M Charles, I just installed the "new" SafeChars plugin, ... Plugins 5
Stefano Piccardi SafeChars thank you Plugins 2
M A (presumbly pretty simple) SafeChars plugin request... Plugins 2
M A "SafeChars" plugin request... Plugins 2
S SafeChars plugin Plugins 2
Charles Dye New plugin: SafeChars Plugins 15
Joe Caverly 64-bit Plugin development using PureBasic Plugins 15
R New Plugin Plugins 0
Alpengreis elevated plugin questions Plugins 3
fpefpe utf-8 support in sdk/plugin api Plugins 4
S How to? Can @DU function in 4Utils64 plugin somehow cater for dirs with spaces? Plugins 3
vefatica Plugin access to arrays? Plugins 4
vefatica How big is a plugin's parameter buffer? Plugins 5
C @knownpath plugin Plugins 0
Charles Dye Updated OSD plugin Plugins 0
Joe Caverly C# plugin framework for JPSoft's TCC Plugins 0
dcantor Help for newest version of TEXTUTILS plugin Plugins 10
dcantor UISTUFF plugin missing help topic Plugins 12
dcantor Request for documentation for ISO8601 plugin Plugins 4
vefatica Possible with a plugin? Plugins 6
dcantor Inconsistency between textutils plugin and wrap utility Plugins 2
H Latest ISO8601 plugin? Plugins 1
Charles Dye New plugin: QKeys Plugins 34
S Plugin to quickly locate all files hard linked together Plugins 5
S Documentation Plugin everything.dll Plugins 5
newbie How to? Multi-plugin installation errors, Re: FedUtils8 Plugins 7
vefatica Plugin -> thread -> Command() -> Ctrl-C? Plugins 20
Charles Dye A weirdoid plugin question Plugins 6
M A weird error re a plugin... Plugins 0
vefatica Plugin dilemma Plugins 2
fpefpe Documentation Plugin API/SDK Plugins 3
C Looking for Vince's old 4UTILS plugin for TCMD v8 Plugins 1
S DESKTOP plugin - anyone ? Plugins 0
C How to? a plugin to sort Outlook Express "rules" Plugins 0
M ISO Plugin: Yes, it's wonderful, but it could be yet more wonderful... Plugins 7

Similar threads