Subj : "On the Fly" Hex-numb conversion ... ??? To : Steve From : Gerald Miller Date : Sun Mar 03 2002 06:44 am Hello Steve, Subject: "On the Fly" Hex-numb conversion ... ??? On Sunday March 03 2002 at 00:54, Steve wrote to Gerald Miller: S> From: "E. S. (Steve) Fabian" S> Gerald.Miller@xspamp0.f512.n342.z1.fidonet.org wrote: >> I had thought about: >> >> iff exist %INC%\0000????.* then >> iff exist %INC%\0000FE05.* then >> dir /hkmfo:d %INC%\????FE05.*>%INC%\INCOME.DAT >> endiff >> endiff S> Seems like it should do the job. Incidentally, you could use S> %INC\... instead of 5INC%\... throughout, 4DOS doesn't need S> the terminating %; if a character follows a variable name S> which is a legal character in a variable name, the preferred S> syntax is %[variablename]... Usig this syntax, the S> "variablename" itslef may include a variable, e.g., %[x%n] S> where n has a value in 00..99 allows the emulation of an S> array of variables. Sorry. This another one of those "old habits die hard" holdovers. There were some times when I had difficulty getting a batch (or more) to run and it took a considerable period before I hit on the fact that the extra percent symbol was essential. Since those periods, I've always used the extra %. I don't believe that the extra percent symbol does any "harm" (other than adding another byte to the filesize for every extra %. ???)... Your advice about the extraneous percent symbol is gratefully received and will be exercised should the filesize reach the critical boundary - 64K. S> Are you sure that if 0000FE05.* is matched, no other files S> can match "0000????.*" ? Because if it is possible, you have S> to use move elaborate techniques, including S> >>%inc\income.dat, etc. You have raised a very valid point and this gave me cause for concern.... The purpose of the snippet was to devise a method by which Squish (mail tosser) could handle mail packets (hex_number.* - where "*" would deal with the Fidonet naming convention of .SU# [# is a range of 0 to 9] {same for .MO#, .TU#, etc.}) coming from (so far) two different systems. I suppose I could create a list of file extensions that I wish to EXCEPT and apply the except command before the: iff exist %INC%\0000????.* then command, but doing so could possibly create a very large list of valid file extensions to exclude (and then, there is always a possibility that some will be missed)... The other alternative (that I can think of) would be to create a list of valid file extensions to include and replace the "*" with a pointer to that file... ??? I just checked my %INC directory and the only file that came "close" to violating 0000????.* was 00GLOBAL.ZIP, so I guess that I have to consider the possibility of receiving a 0000WHAT.*, 0000EVER.*, or 0000TEXT.* file (etc.).... What is (are) your recommendation(s)??? And, before I forget... Why append the INCOME.DAT file? The purpose was to do a (one-time) directory listing (sorted by date/time) of any "hex" files because when Squish has completed processing these files, they no longer exist - Squish deletes them when all the *.PKT files have been extracted (Squish then tosses the *.PKT files to their respective area_tag_name and then deletes the *.PKT files). Thanks ... Gerald --- * Origin: achieved through a ceremony... to summon the spirits. (1:342/512) .