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:
  #1  
Old September 24th, 2005, 05:01 PM
hotscripts2 hotscripts2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 17 hotscripts2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 27 m
Reputation Power: 0
Simple FTP Question

I want to know if you have a large directory with 100,000 + files that normally times out when opening the correct way to save files to it using ftp, without opening it completely.

Here's what i mean

If I try and open the dir it is too big and fails to open. Now I need to save files to it and I know I can with out opening the whole file.

The two ways I saved a file to that dir from the ftp program was

1. I was able to click on a file in another dir that was on the server and right clicked and selected move to and then selected the correct path to the large directory and bam, it moved it quick and i tested the url to that picture and it was there, no timeout just there instantly.

The second way i did was I clicked on a file on my computer side of the ftp program and dragged it to the large directory which was visible but not open meaning I was is sa httpdocs/mysite/images

the large file would be in this example at httpdocs/mysite/images/largedir

so I just dragged the file over the folder /largedir and it dropped the picture in it no problem..


So my question is for programming sake to upload pics from a program that mimicks the ftp process what commands or how do you tell the ftp to drop the item in a particular file with our opening it, basically to mimick what i did...


Anyone?

Reply With Quote
  #2  
Old September 24th, 2005, 06:14 PM
edman007's Avatar
edman007 edman007 is offline
Trapped on the forums...help
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Aug 2003
Location: /Users/edman007
Posts: 4,617 edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)edman007 User rank is Major General (70000 - 90000 Reputation Level)  Folding Points: 67263 Folding Title: Intermediate FolderFolding Points: 67263 Folding Title: Intermediate FolderFolding Points: 67263 Folding Title: Intermediate FolderFolding Points: 67263 Folding Title: Intermediate Folder
Time spent in forums: 1 Month 3 Weeks 3 Days 5 h 3 m 10 sec
Reputation Power: 788
Send a message via AIM to edman007
just avoid listing the files, you can cd to the directory and its not slow at all, its a problem with GUI apps because they always list the files

so in short just don't send the LIST command when your in a folder with a lot of files
__________________
Feed ME

Reply With Quote
  #3  
Old September 25th, 2005, 09:56 AM
Veamon's Avatar
Veamon Veamon is offline
Blowing up trees with my mind.
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Feb 2005
Location: Neverland Ranch, minus the touching.
Posts: 2,758 Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)Veamon User rank is General (90000 - 100000 Reputation Level)  Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140092 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Weeks 4 Days 8 h 6 m 48 sec
Reputation Power: 942
or have better organization. 100,000+ files sitting there is not a good idea for keeping trakc of things, I would think.
__________________

Raid1 in XP Pro

My open source projects:
------------------------
Blobber - Add images as blobs to SQL Server
------------------------

Reply With Quote
  #4  
Old September 27th, 2005, 12:26 PM
hotscripts2 hotscripts2 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 17 hotscripts2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 27 m
Reputation Power: 0
Well not sure if this will help but here is the .net code for image uploading you see it has the "put" command but it still seems to be trying to open the whole dir any thoughts on a different command to use or how the path to the image directory anything?

Quote:
Friend Sub ftpfile()

Dim sFTPSrcFileName As String
Dim sFTPTgtFileName As String

' For testing purpose we have hard-coded the input file
sFTPSrcFileName = "D:\446224_2_thumb.jpg"
sFTPTgtFileName = "sample1.jpg"
Dim sURL As String
sURL = "ftp://ftp.mysite.com"
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
Inet1.AccessType = icDirect
Inet1.URL = "ftp://ftp.mysite.com"
Inet1.UserName = "myusername"
Inet1.Password = "mypassword"
Inet1.Execute , "PUT" & sFTPSrcFileName & " " & "/httpdocs/myfile/images/imgupld/" &sFTPTgtFileName

Me.WaitForResponse
Inet1.Execute sURL, "CLOSE"
Me.WaitForResponse

End Sub

Friend Sub WaitForResponse()

Dim fWait As Boolean

On Error GoTo ErrHandler

fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
Loop

ErrHandler:
Err.Clear
End Sub

Private Sub Command1_Click()
Form1.ftpfile
Timer1.Enabled = True
Set Form1 = Nothing
Unload Me
End Sub

Private Sub Inet1_StateChanged(ByVal State As Integer)
On Error Resume Next

Select Case State
Case icNone
Case icResolvingHost: Me.lblRESPONSE.Caption = "Resolving Host"
Case icHostResolved: Me.lblRESPONSE.Caption = "Host Resolved"
Case icConnecting: Me.lblRESPONSE.Caption = "Connecting..."
Case icConnected: Me.lblRESPONSE.Caption = "Connected"
Case icResponseReceived: Me.lblRESPONSE.Caption = "Transferring File..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Disconnecting..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Disconnected"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " & Inet1.ResponseInfo
Case icResponseCompleted: Me.lblRESPONSE.Caption = "Process Complete."

End Select

Me.lblRESPONSE.Refresh

Err.Clear


End Sub

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Simple FTP Question


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 6 hosted by Hostway
Stay green...Green IT