Count of files in an ftp directory

Is there a way to get a count of the number of files in a ftp account subdirectory? I couldn’t get Windows XP Windows Explorer to do it. I couldn’t get net2ftp to do it. I couldn’t figure out a way to do it in a UNIX shell if I could shell into this ftp-only user.

I’m just trying to compare a file count locally to one on the ftp directory to verify all the files were delivered.

This signature line intentionally blank.

While I suspect it is not exactly what you are asking, I do that all the time from within my ftp client (leechftp). It has a really nice “directory info” command that shows lots of summary data, including the number of files, and a “compare directories” command.

Not as elegant as “command line” magic, but very useful nonetheless.


net2ftp shows the number of files within the current directory directly above the file listing itself, something like;

Files (13 / 20.16 kB)

However, the file count is strictly for the current directory, it is not a recursive count of files within any sub-directories within the current directory.


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )

Damn Windows!

The difference in file count in Windows Explorer between my FTP directory and my local directory was the invisible file.

I tried LeechFTP on it. Leech found the difference in file count and directory size, but its compare directory feature didn’t select it. At least Leech listed it.

This signature line intentionally blank.