+ Reply to Thread
Results 1 to 9 of 9

Search for file on different subfolders

  1. #1
    Registered User
    Join Date
    12-10-2018
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Search for file on different subfolders

    Hello,

    I have a list of subfolders ranging from A10 to A1000.

    All the subfolder (A10 to A1000) have a different name. All subfolders (A10 to A1000) must have a file named ABC.pdf.
    Basically what I intend is:
    If the file named ABC.pdf exists inside the subfolder that is in cell A10 then cell B10 returns me the full name of the file (ABC.pdf) and in cell C3 the link to the file.
    This same procedure has to run from the A10 to the A1000.


    Thanks

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Search for file on different subfolders

    Did you mean cell C10?
    Though I don't see point in separating B10 from C10.

    Try something like...
    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    12-10-2018
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Re: Search for file on different subfolders

    Thanks for the help,

    Just one more thing, I was trying to change the strFile, instead of being a fixed name, its possible to be a random name?

    Because on different folders the file its different ABC1, other ABC2 etc..

    I tried this for he serch for ABC and .PDF
    strFile = "ABC*.pdf"

    all the files begin with ABC and always .pdf

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Search for file on different subfolders

    Sure something like...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-24-2018
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Re: Search for file on different subfolders

    This code is very useful for me too.
    I was thinking of something similar.
    One question.
    In this Code, how can i add the creation date and the date of modification of the PDF file?
    Thanks.

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Search for file on different subfolders

    Hi, please refer to Forum rule.
    4. Do not post a new help request in an existing thread. (B)
    Please start a new thread for your own question. Referencing this thread via hyperlink if necessary.

  7. #7
    Registered User
    Join Date
    11-24-2018
    Location
    Portugal
    MS-Off Ver
    2010
    Posts
    5

    Re: Search for file on different subfolders

    Sorry all menbers of the Forum

  8. #8
    Registered User
    Join Date
    12-10-2018
    Location
    Morocco
    MS-Off Ver
    2013
    Posts
    5

    Re: Search for file on different subfolders

    thank you so much for the help!

  9. #9
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Search for file on different subfolders

    You are welcome

    If this solved your issue, please mark the thread as solved by using Thread tools found at top of your initial post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search through folder and subfolders a pdf file
    By JPGraphX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2022, 06:11 AM
  2. Replies: 4
    Last Post: 10-21-2016, 05:33 PM
  3. Search for a file in subfolders
    By Roger Roth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2015, 03:28 PM
  4. Replies: 0
    Last Post: 04-21-2014, 04:03 PM
  5. how to search a file in folder and subfolders
    By rakeshredround in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2012, 03:35 AM
  6. Macro to search folder including subfolders for file and open
    By kiraexiled in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-01-2012, 02:45 PM
  7. [SOLVED] file search in subfolders
    By Pflugs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2005, 12:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1