|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Hi,doctor_d!Which control do u use ?
|
|
#3
|
|||
|
|||
|
I used Inet from the INTERNET TRANSFER CONTROL.
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
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?
|
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
Can u give me your all code or post it in there?I hope I counld help u!
|
|
#8
|
|||
|
|||
|
U can get a tutorial and smaple code from:http://www.vbip.com/protocols/ftp/v...tutorial-03.asp
|
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > FTP file size ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|