2

I want to download all the files that are under:

http://sharepoint.company.com/sites/Some Site/Some Directory

to a local directory with vba and excel. I found another question and their answers were saying that I need to map this directory to a drive but I am not able to do so. I know how to download a file from that directory if I know the name of the file but I can't download the whole directory.

Is there a way of doing that?

Thanks!

1 Answers1

0

Unfortunately, the WebDAV (Explorer view) interface is not usable by the normal FileSystemObject

See this similar question Get the content of a sharepoint folder with Excel VBA

The this link from here has some code that hacks into WebDav using ADO... An interesting take on the solution.

Community
  • 1
  • 1
Nat
  • 14,175
  • 5
  • 41
  • 64
  • My problem is that the path that I want to download (the folder) is in the form of http://... and when I am using the FileSystemObject etc I get a "path not found" messsage (although the path exists). Probably, the "Microsoft Scripting Runtime" does not work with "http://..." type of folders. The other option would be to try to map that location to a drive letter (e.g. A: ) and then try to use it as a "normal" folder but I did not manage to do that either... Any other ideas? – Financial Economist Nov 01 '11 at 21:51
  • I tried to use the mapping that is mentioned in the links provided above but I get the following error message when trying to map the drive: "No network provider accepted the given network path.". Any ideas on why this is happenning? – Financial Economist Nov 02 '11 at 11:48