Find folder within a folder which occurs multiple times in that folder

Hello!  i have to find a folder named "Addon" in some folder named
"Installers" and store the path of "Addon" folder in a array.
but "Addon" folder may occur multiple times in "Installers"
e.g.
             Installers\New Folder\Addon
              Installers\New Folder1\Addon
              Installers\New Folder2\Addon

 I have to store all these path in a array how can i do that?

0
mesushant (27)
9/13/2006 7:28:24 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
623 Views

Similar Articles

[PageSpeed] 16

>Hello!  i have to find a folder named "Addon" in some folder named
>"Installers" and store the path of "Addon" folder in a array.
>but "Addon" folder may occur multiple times in "Installers"
>e.g.
>             Installers\New Folder\Addon
>              Installers\New Folder1\Addon
>              Installers\New Folder2\Addon
>
> I have to store all these path in a array how can i do that?

I suggest that you learn how to use the standard C++ container
classes. I'd use:

std::vector<std::string>

.... to store those paths in.

Dave
0
davidl7375 (2060)
9/13/2006 10:07:30 AM
No disrespect to David, but since you're using MFC you could just use a 
CStringList or CStringArray as well.  To get the path you could use 
CFileFind and work your way down all the branches of the folder (I'd use 
recursion and just call the same function again when you come to a 
sub-folder eventually working your way back up as there are not more 
folders).

David's container template suggestion would work well for storing the 
strings as well of course... but you still need to traverse the folders to 
figure out where the Addon foders are located.

Tom

"Sam" <mesushant@gmail.com> wrote in message 
news:1158132503.984900.105540@e3g2000cwe.googlegroups.com...
> Hello!  i have to find a folder named "Addon" in some folder named
> "Installers" and store the path of "Addon" folder in a array.
> but "Addon" folder may occur multiple times in "Installers"
> e.g.
>             Installers\New Folder\Addon
>              Installers\New Folder1\Addon
>              Installers\New Folder2\Addon
>
> I have to store all these path in a array how can i do that?
> 


0
tserface (3860)
9/13/2006 3:56:46 PM
Reply:

Similar Artilces:

I need to compare 3 numbers and find the one in the middle
I have three numbers in a single row and would like to identify the middle number enter that number in another cell. Example: 1st # 2nd # 3rd # result 628 678 720 678 655 625 700 655 748 720 725 725 is there a function in excel that can do this? Thanks, Eddie Try =LARGE(A1:C1,2) VBA Noo -- VBA Noo ----------------------------------------------------------------------- VBA Noob's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3383 View this thread: http://www.excelforum.com/showthread.php?threadid=56811 fasteddie wrote.....

run-time error 2147467259 (80004005)
i have a store that is getting the run time error above only when they have a transaction involving the members of one matrix, and then they are kicked out of the system. if they try to sell one of these items, transfer it to another store, receive it, etc, it will kill the program and give this error. the rest of the information given in the error is "could not find the index entry for RID '1600002bd2765100' in index page (1:42599), index ID 8, database GFANC03. Does anyone have any ideas on the cause of this problem and possible solutions? We are using version 1.2, sin...

Find Duplicate names and delate
Dear experts, I have a small doubt could you clarify that??? That is I find duplicate name but I want to delete one name only, if I filter DUPLICATE….. both names are showing… 1. Select the range of data including the header. You need to have headers for these columns 2. From menu Data>Filter>Advanced Filter>Copy to another location 3. In 'copy to' specify the target cell and check 'Unique records only' 4. Click OK will give you the unique list -- Jacob "Find Duplicate names and delate" wrote: > Dear experts, > I have a small ...

Find a Value the first Time It Occurs
I have a row of values that shows the total cumulative number of sales of items by month. Occasionally, there may be no sales in a month for an item so the cumulative value would stay the same for more than one month. I want to select a number in the row the first time it occurs and not select it if it repeats. What are you wanting to do with the info? To return position (column number) of number 1234 within row 2: =MATCH(1234,2:2,0) A formula that signals it's the first occurence: =COUNTIF($A2:A2,A2)=1 This could be used in a helper row, or as a conditional format f...

Finding a Median
I'm trying to write a query that will return a median for various values taken from a previous query. I've seen some suggestions in my searching, but I haven't been able to get them working. They are also all from before 2003 and refer to Access 97 and 2000. Has any functionality been added to 2003 for this? Or is there a non- code-based way to do it? I've seen it suggested to write a code to open the query, sort it, find the total number of records, divide it in half, then seek out the middle record using that value. I'm still very green when it comes to code, though...

Folders #8
When I go to the All Mail Folders I see 1. MSN Mailbox 2. BCM 3. MSN Mailbox 4. Personal Folders When I open Outlook it always opens to MSN Mailbox. How do I get it to open into the Personal Folders when starting. Thanks for your help. Stephen Reinstein SteveR7138@msn.com Steve Reinstein <SteveR7138@msn.com> wrote: > When I go to the All Mail Folders I see > 1. MSN Mailbox > 2. BCM > 3. MSN Mailbox > 4. Personal Folders > > When I open Outlook it always opens to MSN Mailbox. How do I get it > to open into the Personal Folders when starting. Is this MOOL?...

Find/Replace in RichEdit 2.0
I'm using Windows ME and I've switched from RichEdit 1.0 to 2.0 for my CRichEditDoc/View application so that I can use the ITextDocument interface and can do things such as suspend/resume the Redo buffer. Problem is, now the Find/Replace dialogs don't seem to do anything. If I revert back to RichEdit 1.0 they do! What's going on? BUMP! adriangibbons@yahoo.co.uk (Adrian Gibbons) wrote in message news:<34a2acd5.0404130713.123dbaab@posting.google.com>... > I'm using Windows ME and I've switched from RichEdit 1.0 to 2.0 for my > CRichEditDoc/View application...

setting the same choice and order of the fields in all the folders
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C422DC.8D05E5E0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable How do I set the same choice and order of the fields in all the folders? For the moment the View settings apply to a particular folder and I have = to set them manually in every folder. ------=_NextPart_000_0008_01C422DC.8D05E5E0 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <...

Find (but not find)
My program takes a name from sheet3 goes to sheet1 to Find the name. If it cannot find name, how do you do an If/End to Exit Do while or find out if name has been founf? I have "On Error Resume Next" in program. Thanks again for all your help Gordon As ALWAYS, post your code for comments & suggestions. -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "Gordon" <gwelch1938@yahoo.com> wrote in message news:1184612089.486737.144020@n60g2000hse.googlegroups.com... > My program takes a name from sheet3 goes to sheet1 to Find the na...

copying messages to multiple mailboxes
I've worked around this issue in a number of ways, and it's getting unwieldy and more complicated. So what I'm looking for is a "best method" solution. Exchange 5.5, Outlook 2000/2003 clients. I have a group of users who each need to receive the other's mail, incoming and outgoing. The kicker is they need to receive the message only once. So if I have three users for example, A, B and C, then I need the following: Message from X to A also gets copied to B and C. Message from C to A gets copied only B. The problem I've had most trouble with is a message from...

Finding an event
Hello, I am developing an app that uses a single worksheet to enter data. When user double clicks a button, a new window (in same workbook) opens with a new sheet. My problem is that excel does not seem to have any events for close of window if there are multiple windows in a workbook. Can someone help Peter Peter, That triggers the Workbook_WindowActivate event, you can use that. HTH Bob "Peter Ostermann" wrote in message news:i9m5v8$7bv$02$1@news.t-online.com... Hello, I am developing an app that uses a single worksheet to enter data. When user double clicks a button...

Messages to multiple recipients not delivered to some of them
Hi, We are experiencing a sporadic problem with Exchange 2003 in that messages that are sent to multiple recipients not delivered to some of them. We are running Exchange 2003 SP2 on a Windows 2003 SP1 server. Most of the intended recipients receive the full message, but some of them receive a blank message that has the subject line filled in correctly. Does anyone know what may be causing this? -- bb On Wed, 14 Feb 2007 14:10:32 -0800, brad <piraparana@community.nospam> wrote: >Hi, > >We are experiencing a sporadic problem with Exchange 2003 in that messages >t...

"Folder Visible" Question (Exchange 2000)
Is there a way to set mailbox permissions from the exchange server (like editor, publisher etc...) specifically I am looking to set the "folder visible" option. I am trying to avoid going to every user in the company and doing this, so I am hoping I can do it while sitting at the exchange server. ...

Find value in a column and insert rows above
The set up looks like this: ColU ColV ColW ColX Y N N N Y N N N N Y N N N N Y N N N Y N N N Y N N N Y N N N Y Y Columns will always be U through X and will always be sorted in this order. I need to find the first Y in each column and insert 2 rows above that row. On the blank row above the first Y, I need to highlight in yellow and put title in the first cell, such as New, Old, Existing, Deleted. Any help would be greatly appreciated. Thanks for your time, Dee If desired, send your file to my address below. I will only look if: 1. You send a copy of this ...

cannot find database
I have an excel spreadsheet that is supposed to update a access db. Whenever I try to save the .xls I get an error stating cannot find db. Even when I open the db with access, I get the error and the db opens anyway?????? This only happens on 2 out of 20 pc's and I cannot figure out why???????? Thanks ...

Deleting Spam folder
Hi, is there a way to have MS Outlook 2002 automatically empty my "Spam" folder into my "Deleted Items" folder after it gets filled with an X amount of spam emails? Gordy Gordon Byrne <gordyjb@yahoo.com> wrote: > Hi, is there a way to have MS Outlook 2002 automatically empty my > "Spam" folder into my "Deleted Items" folder after it gets filled > with an X amount of spam emails? Outlook 2002 by itself doesn't have a "Spam" folder. If you see one, it's because either you have rules moving the messages there or y...

Sum if Condition is Equal in Range Date and find column
I want to make a sum if Range is a week number and if style is Equal to CONC-92 or CONC-45 Week# 49 Week# 50 CONC-92= 27 CONC-92= 30 CONC-45= 27 CONC-45= 30 Datas are in a pivot table and... Pivot table looks like this: Date CONC-92 CONC-45 CONC-92 CONC-45 12/7 5 5 10 10 12/8 2 2 10 10 12/9 5 5 10 10 12/10 5 5 10 10 please help -- Lorenzo Díaz Cad Technician ...

public folders #19
i have Outlook 2003 & 2007. Can I create a shortcut for certail folders in public folders in OUTLOOK - maybe with an icon in the toolbar? Thanks, Raul Rego NJPIES You can drag them into the Favourites place in Public Folders - that puts them at the top of the Folder Tree so they are quickly accessible. You can also asd them to the Outlook Shortcuts, using Add New Shortcut button when viewing Shortcuts in the Navigation Pane. Regards Judy Gleeson MVP Outlook Trainer and Consultant There are various articles about using Outlook here: www.judygleeson.com Canberra, Australia &quo...

Trapping a NO FIND after a find
I use the code below to store a row number to a variable after a find. I would like to trap a NO FIND if the find is unsuccessfull Any ideas. FSt1 provided the code below Sub macfindrow() dim rn as string dim rng as range dim therow as long rn = inputbox("enter something to find") if rn <> "" then Set rng = nothing Set rng = range("A1:IV65536").Find(what:=rn, _ After:=Range("A1"), _ Lookin:=xlformulas, _ Lookat:=xlpart, _ ...

Multiple date parameters
I have three queries: MonthlyAll, MonthlyShows, and MonthlySpots. My main form is built off of MonthlyAll. It's main purpose is to provide a list of cities in a single form view, so that I can scroll through the cities and view the corresponding data. The main form contains two subforms: MonthlyShows and MonthlySpots. The subforms are linked to the main form by city and display the respective shows and spots by date. My question seems simple enough: Upon opening the form, I would like to type in a single date range ("Between [] And []"); and view only those shows and ...

How do I find the out of office reply?
My out of office reply is missing from tools. How can I retrieve it? Out of Office reply <Out of Office reply@discussions.microsoft.com> wrote: > My out of office reply is missing from tools. How can I retrieve it? Unless you are using an Exchange server, you will not have the Out of Office Assistant. See this: http://www.slipstick.com/rules/autoreply.htm -- Brian Tillman ...

Exch 2003 Public Folder Problem
I have an xcng 2003 mixed environment with Exchange 5.5. I have some PF's that are not receiving email from internal sources, but they can receive email from the internet. I don't see anything in the queues. I don't get any Delivery errors. Nothing. What can cause this behavior? Have u set up replication of the PF to the Exchange 2003 server? Can Exchange 5.5 users post? "Lost" <anonymous@discussions.microsoft.com> wrote in message news:077c01c4d9ba$4d9dfb00$a501280a@phx.gbl... >I have an xcng 2003 mixed environment with Exchange 5.5. > > I have...

Finding numbers in rows and highlighting them
Hi everybody :) I need help. This is a lotto system. I have a spreadsheet with 508 rows and 45 columns. In each row there are 45 numbers mixed (1 to 45). I need a script or some other way to find where particular (drawn) numbers are in each of the 508 rows. If my explanation is not clear please ask for farther clarification. Thank you in advance for your help. Joh -- Johncobb4 ----------------------------------------------------------------------- Johncobb45's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1658 View this thread: http://www.excelforum.com/showt...

Autorun a macro at preset times
I have a macro that draws data from a website and places in to several tables which are then organised is different criteria. Instead of me manually hitting the button with assigned macro, I want to have the macro run itself every 10 minutes. How do I do this please? Darren, have a look at ONTIME in Excel VBA help -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Darren" wrote: > I have a macro that draws data from a website and places i...

Outlook 2003 2 Personal Folders
I have 2 persoanl folders in Outlook 2003. I recieved a new machine and copied pst file from Outlook 2000 machine to correct locations on Outlook 2003 machine. Now I have duplicate everything. Receive new messages - goes to both inbox. HELP!!! Gladys <anonymous@discussions.microsoft.com> wrote: > I have 2 persoanl folders in Outlook 2003. I recieved a > new machine and copied pst file from Outlook 2000 machine > to correct locations on Outlook 2003 machine. Now I have > duplicate everything. Receive new messages - goes to both > inbox. HELP!!! You should never overw...