in reply to Re^2: FTP Question
in thread FTP Question

OK for why it is failing... It isn't failing... It is just not uploading allt he stupid images. What it is is a CD with a directory called Images. In this directory is approx 42,000 badge images. No I go to command prompt ftp to the server and say mput e:\images\*.jpg and it begins uploading and finishes without complaining. But when I run my script to check to see if the user has an image I notice some images are not uploaded. Like they are left out and ignored. I have tried using the command line from Windows 2000 and tried using CuteFTP (It wont even start with that program) and tried WS_FTP and same thing. It uploads but doesn't upload everything. I think it is due to the number of files. I don't think one should put over 10,000 files in a single directory. Just me I dunno... That is why I am needing to do this. But thank you all for this help. It has helped get me in the direction I need to go to solve this issue and move on to the next. Thank you all...

-----------------------
Billy S.
Slinar Hardtail - Hand of Dane
Datal Ephialtes - Guildless
RallosZek.Net Admin/WebMaster

perl -e '$cat = "cat"; if ($cat =~ /\143\x61\x74/) { print "Its a cat! +\n"; } else { print "Thats a dog\n"; } print "\n";'

Replies are listed 'Best First'.
Re: Re: Re: Re: FTP Question
by waswas-fng (Curate) on Dec 17, 2002 at 16:30 UTC
    I would make two stabs at this, First 40k Files in one dir on a cd is kinda bad, it will take forever to stat the dir. You may try soting your files into a tree (this kinda reminds me of the old news servers that tried to store all of the groups in one dir, they all moved to a fs tree or db of some sort pretty quickly) For example if your filenames look like this:
    B12C113.jpg D92C113.jpg G12C934.jpg B12C117.jpg

    You may be able to sort them into a dir tree like this:
    \B\1\2C113.jpg \B\1\2C117.jpg \D\9\2C113.jpg \G\1\2C934.jpg

    It really depends what your file name convention is. You really just want to split the file names up in a way where you get a clean spread across a lot of dirs where you do not have to stat 40k files when you stat the dir. the task of creating this layout should be very simple with substr. Let me know if you need more info I may have some code around that shows an example of how to do this.

    Then deal with the transfer -- you may notice that it is simplified.

    -Waswas