Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 01:51:34 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Lookinjg for a "FTP-Size" tool  (Read 4363 times)

crono

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 179
    • View Profile
    • Donate to Member
Lookinjg for a "FTP-Size" tool
« on: March 17, 2007, 09:18:37 AM »
Hi,

I need to check some FTP-Quotas. Is there a Tool which connects to the FTP-Server, lists the files and sums up the filesize? In the best case it runs from the commandline and exports the file -> size list in a Excel importable format. Any suggestions?

thx
Crono

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #1 on: March 17, 2007, 10:05:14 AM »
Some ftp servers have more advanced features through the "SITE" command, which might be able to do what you want. Failing that, a lot of servers support a "recursive ls listing" (which makes this job a lot easier), but it is unfortunately turned off on a lot of servers, since it can be used for DOS attack.

So, before looking further for an app to do this, I'd check if your server supports one of these methods.
- carpe noctem

crono

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 179
    • View Profile
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #2 on: March 17, 2007, 10:24:22 AM »
Hi f0dder,

thanks for the suggestions. I'm running on a shared Host and the only SITE Commandos available are CHMOD, IDLE and UTIME. ls -lR seems to be disabled also. I think Im going to script it by myself...

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #3 on: March 17, 2007, 10:33:38 AM »
Ah, how unfortunate - but not surprising for a shared host (hell, not surprising for any kind of non-dedicated server).

I'd be surprised if there isn't some free tool that does recursive scanning, though.
- carpe noctem

crono

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 179
    • View Profile
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #4 on: March 17, 2007, 10:46:18 AM »
I remember that I already had a tool which does this thing :-* (years ago). I think it was called ftpsize - I searched but couldn't find it on the web anymore... I believe the producer was a company (or site) called albinoblacksheep (or something like that) - but not the Flash Movie guys :) - ah this is confusing... I'll take a nap  ;)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,421
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #5 on: March 17, 2007, 11:24:50 AM »
sounds like a nice thing i wouldnt mind having this kind of tool either.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #6 on: March 17, 2007, 11:46:45 AM »
ah this is confusing... I'll take a nap  ;)
Good thing it's not just me who does that :]
- carpe noctem

crono

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 179
    • View Profile
    • Donate to Member
Re: Looking for a "FTP-Size" tool
« Reply #7 on: March 18, 2007, 11:59:22 AM »
Hi,
today I scripted such a tool. It runs eighter on your Server or from your client. It Exports all files found into a CSV file (so you can order it simply by filesize). You can specify a limit to log only files which are greater than - for example - 500kb. I attach it - feel free to use it. The zip contains:
- a commandline version (the PHP Version compiled to a standalone exe File)
- a PHP5 Version for running on your server
- a PHP5_cli version

Requirements:
- commandline : none
- web-version : PHP5
- cli-version : PHP5, pear Console/Getopt.php

Usage:
- web-version : see index.php
- cli-version : php cli_ftpquota --host="x" --user="x" --pass="x" [options]
- commandline : ftpquota.exe --host="x" --user="x" --pass="x" [options]

Run it without any options for help

Parameters:

-h    --host          hostname
-u    --user          username
-p    --pass          password
-s    --silent        avoid output to stdout
                      default = false
-e    --exportfile    Filename for the exported CSV File. Enter "true"
                      for default name.
                      default = false
-l    --limit         Only show files with a filesize above the limit in
                      Kilobytes
                      default = 0 (no Limit)


Please report me any Bugs or feature requests...

bye :-)

//edit: I removed the zip temporary, because my virus scanner gave me an alert...
« Last Edit: March 18, 2007, 04:20:36 PM by crono »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,258
    • View Profile
    • Coding Snacks by Lanux128
    • Read more about this member.
    • Donate to Member
Re: Lookinjg for a "FTP-Size" tool
« Reply #8 on: May 24, 2007, 09:53:22 PM »
there's another solution here: FTPpie - check space usage on your FTP server :)