473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Downloading folder from website

Hi there,

I have to download files/folders based on the link provided from a website (Sharepoint)
I have following code which works fine if I try to download a file, but dont know the code which will enable me to download the entire folder (with all files and folders in it)
Expand|Select|Wrap|Line Numbers
  1. Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
  2. "URLDownloadToFileA" ( _
  3. ByVal pCaller As Long, ByVal szURL As String, _
  4. ByVal szFileName As String, _
  5. ByVal dwReserved As Long, _
  6. ByVal lpfnCB As Long) As Long
  7.  
  8.  
  9. Sub DownloadFileFromWeb(PathToBeCopiedFrom, PathToBeSavedAt)
  10. Dim i As Integer
  11.  
  12. strUrl = PathToBeCopiedFrom
  13. Dim strSavePath As String
  14. Dim returnValue As Long
  15.  
  16. strSavePath = PathToBeSavedAt
  17. returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0)
  18.  
  19. 'MsgBox returnValue
  20. End Sub
  21.  
  22. Sub TestDownload()
  23.     DownloadFileFromWeb "https:\\dspace.de.intranet.ab.com\site0194\Final Data Repository\Icelandics\Commodities\Close-out Documentation\\COM_Commodities_RMS TradeID 64400168.doc", "C:\Documents and Settings\khamyog\Desktop\Test\T34\x.xls"
  24. End Sub
Any suggestions,

Thanks
Mar 12 '09 #1
0 1069

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ernst | last post by:
Hello, I'm using Linux Redhat 8.0 (LAMP). I have a file tx.zip , that is placed in /tmp. Now I want people to be able to download this file without copying it to the website tree Can I make a...
3
by: ASP Spam Fighter | last post by:
Curt_C Wrote: > open the request in a new window That would work fine for me, but I'm writing this script for people who believe that we must assume total and utter user stupidity. Since this...
0
by: Edwin Knoppert | last post by:
I have not much good response lately on the ASP.NET website, so i'll try it here. I have a problem with downloading a PDF by using the response object. A part of it: ..Response.Clear()...
0
by: Sathya | last post by:
Hi Am using an ASP.NET website. i have an excel template stored in a folder in the server. the excel template already has some data inside. i need to add some more data to the excel sheet...
2
by: Bala | last post by:
Hi I am trying to download the PDF files from my webserver using ASP.Net. All my files are stored at F Drive on webserver. Like this F:\Main Folder\Sub Folder\Files\File1.pdf I am...
4
by: mike | last post by:
i wonder if bin folder still use in asp.net 2.0 when i migration website for 1.1 how sholud i do? i guess complier would make 2 dll another folder one is bin folder and the other is...
3
by: Paul Wilson | last post by:
Hi guys, I'm trying to enable downloading of a file from a website (my own website) from a windows application done in vb.net. Does anyone have a sample code for this (NOTE : I don't want to use...
1
by: Greg L. | last post by:
I apologize if this is not the correct group.... Using the system.net namespace I want to download an entire directory's worth of files. I've been researching furiously and can't seem to find...
1
by: Tarek | last post by:
Dear all. i have a website that is ASPand it contains a database .MDB i cant change the name of the database. What is the best way i can do to preven anybody to download this database. Pls...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.