Forum Moderators: phranque

Message Too Old, No Replies

Strange FTP issue - 2000 cap limit on viewing files

         

mr_nabo

7:14 am on Dec 11, 2008 (gmt 0)

10+ Year Member



Hi,

This has really worried me. I have about 2500 images and a folder called thumbs with the same amount of images in it all together in one main folder.

When I view the files via CPanel's File Manager, I can see everything, however, when I use Coda or Cyber Duck (my FTP programs), I can only see up to 1999 images and no thumbs folder.

Is this a limitation with FTP clients or is there something I can do with .htaccess to allow me to see all the files? I need to give my client access to the images folder so he can upload images and their thumbnails in batches, but with this problem, obviously i can't.

Any ideas as to what it could be?

Thanks

enigma1

7:48 am on Dec 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, check the ftp daemon it may be a hard-lock of 2000 files limit. Or you could ask your host about it if you cannot find the switch.

Ideally you should split resource files into different folders to maintain a good performance level.

mr_nabo

8:15 am on Dec 11, 2008 (gmt 0)

10+ Year Member



Hi enigma1,

How would I check the ftp daemon? Is that possible via CpanelX?

Unfortunately, I can't easily split the images into folders as they are associated with products which will mean going over 2000 product descriptions and reassigning the img urls.

I was reading about and 2000 seems to be a common limit for viewing uploaded files in an FTP client, so there might not be a solution.

Thanks for getting back to me

rocknbil

3:08 pm on Dec 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



which will mean going over 2000 product descriptions and reassigning the img urls.

Yes, and no. There is always a solution. Huge directory dumps are always going to be a problem, and it's only going to worsen even if you manage to view more than 2K files.

How are you at scripting, perl, PHP, asp? I started this small project a few years back. In a short time I realized this was going to be a directory nightmare if left unbridled so I caught it before it got to this point.

What you do is write a small script that does all this for you. It doesn't matter if your product descriptions are in a database or hard-coded in files.

Start with a working test bed: an empty directory called "images-new" or something. If your descriptions are hard coded, create a working directory; if they are in a database, create a new table identical to the existing descriptions table, name it "products_new" or something.

The logic is:

- pull first product off the list.

- find image src. There should be some way to identify the image src from other image src in the code.

- in your program, determine the first letter of the image file. Let's say it's anonymous.jpg. If it's a number, plan on directories 0-9; if it's anything else, plan on a directory "other".

- locate the directory images/a, if it doesn't exist, have your script create it.

- don't move, make a copy of the image in this directory.

- As for the description, if your script is dynamically outputting the image, cool - all you need to do is change your output script to include the directory parsing on outout. If it's hard-coded in the description, then at this point you'd update the description, modifying img src="imagedir/anonymous.jpg" to "imagedir/a/anonymous.jpg", then put the description in a new directory if it's static, or in a copy of the products table if it's a database.

- pull next item off the list . . . .

When done, review all, make sure it's working, and just swap the names around. If your product descriptions are in a database, this is REALLY easy - name the existing table "products_old" and your new table "products."

Better to deal with it now, you'll be glad you did.

mr_nabo

3:30 pm on Dec 11, 2008 (gmt 0)

10+ Year Member



That sounds like a good idea - I'll check that out.

Thanks for the advice!