+ Reply to Thread
Results 1 to 8 of 8

How to get list of files from a Sharepoint folder

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    How to get list of files from a Sharepoint folder

    Hi,

    I am trying to get list of files that are in a specific share point folder.

    Note: i have read/write access permission to this share point folder. But i have NOT mapped this share point folder to a drive letter and do not plan to.

    I have google searched this for hours and nothing i find seems to work.

    Can someone help?

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to get list of files from a Sharepoint folder


    Hi,

    seems like a duplicate thread … As your previous thread about SharePoint has no solution except to map a drive
    why this one should have more chance ? … Maybe other ways on specific OS forums.
    Last edited by Marc L; 07-23-2023 at 06:54 PM.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,939

    Re: How to get list of files from a Sharepoint folder

    https://learn.microsoft.com/en-us/po...repoint-folder
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    Re: How to get list of files from a Sharepoint folder

    your right its similar and one could argue the same. but its not. in the previous post i was asking if a file was saved to a location. I finally found some code to do this without mapping the drive (see below):

    Please Login or Register  to view this content.



    so i guess this is why i determined it to be different. You all have been the ones i turn to when i cant figure out a solution on my own. And i know that you
    all are saying i need to map the drive.......but this is not an option. So are you sure there is no other way to get a list of the file names from a sharepoint directory?

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to get list of files from a Sharepoint folder


    In your previous thread you asked for if a folder exists on SharePoint, did you try the previous post code ?

  6. #6
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    Re: How to get list of files from a Sharepoint folder

    i am sorry.......i tried to answer the question about my current post being similar so i posted code
    from a previous post showing that i didnot have to map to a drive.

    Anyway, i am trying to determine the files in a sharepoint directory /folder without mapping the drive.

    Mapping a drive is not an option that i can do.

    if this is not something that can be done with out mapping a drive then i guess i am out of luck.

    But i was hoping there was a way without mapping a drive.

    Sub-Question: if i map a share point drive using say the letter "q" and then i write the code accordingly and someone else either maps the sharepoint
    drive using a different letter say "n" or they dont have itmapped at all...........wont my code generate a runtime error?

  7. #7
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,666

    Re: How to get list of files from a Sharepoint folder

    so i found this code on line and it seems to work

    i think it is doing what you all said which is map the share point folder to a drive. but the drive
    its mapping to is an arbitrary drive in this case in the code its letter "A" (i wonder what would happen in macro if
    drive letter "A" is already taken)

    the code gets all file names plus a lot of other junk and puts it onto the first sheet inthe file. this is not what
    i plan on doing just wanted to see if code worked.

    again, do you think i need to alter this in some way to map to non-traditional drive number ...not sure what would happen if i gave macro to someone else
    and they already had drive A mapped to something else.



    HEre is code i found:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: How to get list of files from a Sharepoint folder


    You can check the free drive letters and choose another one in order to normalize for everyone like S: for SharePoint.
    The map can be permanent without the need to be done under VBA. Normally it's the job of an IT guy …
    Last edited by Marc L; 07-24-2023 at 05:12 AM.

+ 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. MS Excel VBA to return a list of SharePoint files in a Folder accessed via https address
    By joeyslaptop in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2022, 07:48 PM
  2. open all excel files in a sharepoint folder
    By Ish23 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-13-2021, 02:36 AM
  3. [SOLVED] Trouble Updating a list of Files if a file no longer exists in the Folder/Sub Folder Dir.
    By jrtraylor in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-26-2019, 02:03 AM
  4. Save files from an Outlook SharePoint list via VBA
    By koltregaskes in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 09-04-2017, 09:14 AM
  5. VBA to loop through all files in a Sharepoint library/folder
    By red1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2016, 07:09 AM
  6. Tweak VBA to Move SharePoint Files to a Folder in Same Location
    By n_lindsey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2014, 03:21 PM
  7. [SOLVED] Open all files in a SharePoint folder (Problem: Files open out of order)
    By holmstarrunner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2012, 10:13 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