PDA

View Full Version : Advanced files search


teognost
08-28-2007, 01:55 PM
I need to perform some complicated search and still I did not solve it,I am wondering whether you have some sample of this type…
Basically-I know the full path of a file –like D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC \Commands\General\LogoffCommand.cs.
I need to make a search in the current folder (D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BI C\Commands\General)and its subfolders for csproj files having inside written the string ‘LogoffCommand.cs’ (file name).
If found->then memorize the full path of every csproj file in a macro as a line.
Then search one folder up,in D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC \Commands and its subfolders for csproj files containing the string ‘General\LogoffCommand.cs’.
If found->then memorize the full path of every csproj file in a macro as a new line.
And so on ,the last search would be made in D:\SVNExport\ffng and its subfolders (for csproj files containing string ‘MockUp\AutoTrader\AutoTrader.BIC\Commands\Gener al\LogoffCommand.cs’) .
If you have any suggestions about this-I’d be very grateful!

kinook
08-28-2007, 02:57 PM
See attached sample.

teognost
08-29-2007, 09:58 AM
Wow,thanks a lot,without your help it would have been quite difficult for me to solve it!
One more thing-I need to do this operation for more files ,basically I have a cycle where the path for current file (e.g "D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC \Commands\General\LogoffCommand.cs") is written for every step in a macro CURRENT_FILE_LOCALFULLPATH.
So I do not know how many folders would contain the path for current file,this info is dynamically determined.
I am thinking now about how can I change the sample you put here in order to adapt it to this request....
So to have some cycle that would split the path from CURRENT_FILE_LOCALFULLPATH into folders FIND_DIR like
D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC \Commands\General
D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC \Commands
D:\SVNExport\ffng\MockUp\AutoTrader\AutoTrader.BIC
D:\SVNExport\ffng\MockUp\AutoTrader
D:\SVNExport\ffng\MockUp
D:\SVNExport\ffng
and for each of this folders to search for the csproj files containing the related string FIND_STR (FIND_STR would be the difference between CURRENT_FILE_LOCALFULLPATH and FIND_DIR)

kinook
08-29-2007, 12:47 PM
Attached.

teognost
08-29-2007, 01:04 PM
Thanks a lot,I think the support here in Kinook is unbelievable good and helpful!
In the mean time I have founded some solution as well (see attachment) but yours is much better as it solves everything much easier,therefore I would use yours.