|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
List proceedure names all files:-| over the past years of my attempts to learn vb I've amassed thousands of files in my code folder<s> many are probably more or less duplicate proceedures with revisions over time, renamed, then forgotten, then rewritten again, :-( I would love to trim down all the old junk and get rid of what's not useful.To that end I was thinking of how to find duplicate (and / or similar proceedure names) in various files so I can at least get an idea of what files I could get rid of or merge into a common file... so my thought was, For Each file in folder, ListProceedureNamesInFile File For each ProceedureName in list GetListOfFilesContaining ProceedureName naturally I don't want to loop through all files multiple times so I thought I could loop through files once, store proc names and their parent filename in a database then use a Select / Where sql process to find duplicates/similarities to generate some kind of report to textfile or listview or treeview or flexgrid or something???/ does anyone have suggestions on viable design concept for something like that? Thanks, Mark "MP" <NoSpam@Thanks.com> wrote in message ok, so like i said it was a dumb question...news:OdYDLyuKIHA.5224@TK2MSFTNGP02.phx.gbl... > Sorry, another dumb noob question! > :-| :-) fwiw (very little<g>)I did the following loop through files store proc names and filename in database use a Select / Where to find duplicates/similarities for now just logging results to text file it does give an interesting glimpse into my garbage collection <vbg> still interested in anyones' opinion of a better way, Thanks Mark "MP" <NoSpam@Thanks.com> wrote in message using a database may be overkill; a collection or an array could be used for news:e8eBKQyKIHA.748@TK2MSFTNGP04.phx.gbl... > still interested in anyones' opinion of a better way, this. How many files are you talking about? "Bob Butler" <noway@nospam.ever> wrote in message probably but it gives me an excuse to practice with some more database tasksnews:%23I2ZcSyKIHA.4196@TK2MSFTNGP04.phx.gbl... > "MP" <NoSpam@Thanks.com> wrote in message > news:e8eBKQyKIHA.748@TK2MSFTNGP04.phx.gbl... >> still interested in anyones' opinion of a better way, > > using a database may be overkill; a collection or an array could be used > for this. How many files are you talking about? > :-) filtering for *.cls;*.bas;*.frm...2025 files to process... You're right, I could probably use a dhSortedDictionary just as easily as a db. in fact I collect the data into a collection before putting in db (using a little cProcData class) If i change the FileName property (in cProcData) to FileList (delim string) I can just append filenames as I find matches to the ProcName I'll play around with that idea too Thanks Mark "MP" <NoSpam@Thanks.com> wrote in message a dhSortedDictionary?news:eFV4sS0KIHA.5920@TK2MSFTNGP03.phx.gbl... > You're right, I could probably use a dhSortedDictionary just as easily as > a "Bob Butler" <noway@nospam.ever> wrote in message yep, posted here by Olaf Schmidt some time backnews:eb2qJM4KIHA.4752@TK2MSFTNGP05.phx.gbl... > "MP" <NoSpam@Thanks.com> wrote in message > news:eFV4sS0KIHA.5920@TK2MSFTNGP03.phx.gbl... >> You're right, I could probably use a dhSortedDictionary just as easily as >> a > > a dhSortedDictionary? > > www.datenhaus.de/Downloads/dhSortedDictionary.zip replaces the ...shudder... Scripting.Dictionary and vb collection and then some makes any use I ever had for a dictionary extremely easy (eliminates all the sorting code etc) :-) highly tuned and just way cool.I figured everyone was using em by now <g> |
|||||||||||||||||||||||