Jump to content

How to check folder size via ftp


Gordoni
 Share

Recommended Posts

hey!!

all I can think of is to recursively pass through all files and folders of the current folder and calculate all files sizes.

You might find happiness with commands : _FTP_ListToArray2D and _FTP_FileGetSize !!

Good luck!!

hench

Link to comment
Share on other sites

Please don't post in my topic if you not able to help.

Sorry but you dont decide what threads I post in.

Why not try to give a bit on information about what you have done, you have a perfectly valid suggestion up there yet you decided not to try it, nor ant explaination why, and just post some code and say it does not work.

No mention of what about it didnt work or what error you recieved.

Heres a tip: you will get as much help in answeres as you put in information.

But you have been here long enough to know that.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

  • Moderators

@Gordoni

You are the author of this thread. Not the owner of it.

When you post multiple threads on the same topic because you're not getting a solution fast enough to suit your needs, you lose a lot of respect from the moderators.

So much so, when we see you post a "Report" because you don't like what some has said, we tend to ignore it.

On this one, I agree with JohnOne, you've stated nothing really that's helpful. The solution is very easily obtained from FTP threads in the example forum. In one of the threads, someone even showed you the function name.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Developers

You need to list all files in the directory and add them together:

_FTP_DirSetCurrent($Conn, $folder666)
Global $totalSize
$aFile = _FTP_ListToArray2D($Conn, 2)
For $x = 0 to UBound($aFile)-1
    $totalSize += $aFile[$x][1]
    ConsoleWrite('Name:' & $aFile[$x][0] &'   Size:' & @TAB & $aFile[$x][1] & @crlf)
Next
$Ftpc = _FTP_Close($Open)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $totalSize = ' & $totalSize & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...