Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Go Back  Xtreme Visual Basic Talk > > > Using INet Or An API to Check File date on a FTP site.


Reply
 
Thread Tools Display Modes
  #1  
Old 01-16-2006, 04:02 PM
ZeroEffect's Avatar
ZeroEffect ZeroEffect is offline
Regular
 
Join Date: Mar 2004
Location: Detroit, MI
Posts: 86
Question Using INet Or An API to Check File date on a FTP site.


Here is what I'm trying to do.

1. Check the date of a file on an FTP server.
2. If the date has Changed download the file.
3 If the date hasn't changed check again later.

I know how to get file information from a file that is on my computer or one on a network drive. But how can I get this information with out downloading the whole file first.

Thanks

ZeroEffect
__________________
If You Can't Find It, Build It.
Reply With Quote
  #2  
Old 01-21-2006, 10:58 AM
ZeroEffect's Avatar
ZeroEffect ZeroEffect is offline
Regular
 
Join Date: Mar 2004
Location: Detroit, MI
Posts: 86
Default

<BUMP?>

Anyone?
__________________
If You Can't Find It, Build It.
Reply With Quote
  #3  
Old 01-22-2006, 04:21 PM
AntiSilence's Avatar
AntiSilence AntiSilence is offline
Regular
 
Join Date: May 2003
Location: Notts, UK.
Posts: 57
Default

Have a look at the WinSock control. That can do FTP related things I think.
__________________
"In this house we obey the laws of thermodynamics..." - Homer J. Simpson
Reply With Quote
  #4  
Old 01-22-2006, 05:48 PM
dilettante's Avatar
dilettanteUsing INet Or An API to Check File date on a FTP site. dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,520
Default

With the Microsoft Internet Transfer Control you can use the Execute method and an operation parameter value of "DIR filename" to retrieve the directory information. You then GetChunk the response back and parse out the information you want, such as the timestamp.

Transferring a file is similar using Execute and "PUT localfilename remotefilename" to initiate the operation, then you monitor state changes until the transfer is complete.

It is all covered in the VB documentation.

Some 3rd party controls can make this easier, and some don't have the proxy server problems of INet. Other people start an external instance of FTP.EXE and control it through anonymous pipes but that's a deeper subject. One way to do the latter with less pain is to use the WScript.Shell object's Exec method to create a WshScriptExec object, which provides easy access to the spawned process' Std I/O streams.

Doing something like rolling your own FTP client logic from a Winsock control is sort of masochistic. It involves all of the effort required for any of the other approaches that use existing FTP tools plus the extra grief of writing and debugging FTP client code.
Reply With Quote
  #5  
Old 01-22-2006, 06:44 PM
AntiSilence's Avatar
AntiSilence AntiSilence is offline
Regular
 
Join Date: May 2003
Location: Notts, UK.
Posts: 57
Default

Makes sense. I've only used the WinSock control for networking apps and the Inet control for version checking etc.
__________________
"In this house we obey the laws of thermodynamics..." - Homer J. Simpson
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site. Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
 
Using INet Or An API to Check File date on a FTP site.
Using INet Or An API to Check File date on a FTP site.
 
-->