FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 14th, 2004, 12:01 PM
doctor_d doctor_d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 doctor_d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
FTP file size ?

Could somebody please help me?

I've been asked to write a program to scan the FTP server for any new files at work. I assume the simple way around it would be to scan for a list of directories and store all file names. When a new file appears it would then prompt the local user that data has arrived.

My big problem is I don't know what commands to call.

I've managed to figure out the basics -

.URL = "ftp://ftp.XXXXXXXX.com"
.UserName = "ftp.XXXXXXX.com"
.Password = "XXXXXXX"
.Execute , "ls" .....directory list

But how do get anything back????

Any help/input would be most appreciated...

Cheers

Paul

Reply With Quote
  #2  
Old January 15th, 2004, 02:20 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Hi,doctor_d!Which control do u use ?

Reply With Quote
  #3  
Old January 15th, 2004, 03:12 AM
doctor_d doctor_d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 doctor_d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I used Inet from the INTERNET TRANSFER CONTROL.

Reply With Quote
  #4  
Old January 15th, 2004, 07:42 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Plz add this in your code:
In the control's StateChanged event handler, look for the icResponseCompleted state. Use GetChunk to retrieve the returned data.


Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim var_data As Variant
Dim str_data As String

If State = icResponseCompleted Then
' Get the first chunk.
var_data = Inet1.GetChunk(1024, icString)
str_data = str_data & var_data

' Get the rest of the chunks.
Do
DoEvents
var_data = Inet1.GetChunk(1024, icString)
If Len(var_data) = 0 Then Exit Do
str_data = str_data & var_data
Loop

txtResults.Text = str_data
End If
End Sub

Reply With Quote
  #5  
Old January 15th, 2004, 07:55 AM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,171 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 37 sec
Reputation Power: 110
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
This is just a question - I've never had to do anything like this myself, but will your uploaded files be in the same directory or of the same type? How are you going to know, from outside the box, which files have been uploaded and which ones have not?

Reply With Quote
  #6  
Old January 15th, 2004, 08:02 AM
doctor_d doctor_d is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 3 doctor_d User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Many thanks

Thanks for the replies...

I've tried the above but nothing happens ???

The server currently has 4 folders, I need to get it to scan the folders and then see if anything new appears.

I was aiming for it to record the folder names and then the contents, if any changes are found since the previous scan then it prompts the OP to do something with the new files....

Cheres

Reply With Quote
  #7  
Old January 16th, 2004, 04:51 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Can u give me your all code or post it in there?I hope I counld help u!

Reply With Quote
  #8  
Old January 16th, 2004, 05:15 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
U can get a tutorial and smaple code from:http://www.vbip.com/protocols/ftp/v...tutorial-03.asp

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP file size ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway