[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Inet Question

Posted on 2005-04-08
13
Medium Priority
?
243 Views
Last Modified: 2012-05-05
I want to copy a file off a webserver to my computer, probably via http (have been using INET, but can use something else if there's a better solution) but only if the file date on the server is newer than the one on my computer.

Thanks

0
Comment
Question by:jmingo
  • 7
  • 5
12 Comments
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13737863
You can use some API to do this..

Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long


Call URLDownloadToFile(0, "http://www.something.com/yourfile.txt", "c:\test.txt", 0&, 0&)
0
 

Author Comment

by:jmingo
ID: 13738069
that seems to work pretty well. how can i tell the date of the file first though?

also what dll does that function reference???
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 100 total points
ID: 13738127
The dll that it reference's to is called "urlmon.dll"

You can tell what dll it refrenced to by looking at the declareations:::
'Refrence's to urlmon.dll
      'below'
Lib "urlmon" Alias "URLDownloadToFileA

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jmingo
ID: 13738196
is urlmon.dll common on all windows machines??

also what about finding the file date??
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13738261
I belive it is a System .dll file that is  used by Microsoft OLE (Object Linking and Embedding). I am certain that it is on all operating systems used by microsoft.
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13738271
When you run Package and Deployment setup you have an option to ship the .dll with your package.
0
 

Author Comment

by:jmingo
ID: 13738286
ok great.

can it also find date modified on the server?
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 13738377
No, but you can look at the date when its downloaded to your computer

File Created "displayes the date"

Right click the file and choose properties.
0
 

Author Comment

by:jmingo
ID: 13738526
its for an update program though, i don't want to download the file unless its newer than whats on their computer.
0
 

Author Comment

by:jmingo
ID: 13755502
Any ideas from anyone??
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 14308942
Its been more than 21 days since a comment has been added. My participation in this question seems to lean towards a solution.
Recommend: Accept egl1044
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 14310254
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

[Accept: egl1044 comment]

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

egl1044
EE Cleanup Volunteer
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question