Sign in to follow this  
Followers 0
Gordoni

How to check folder size via ftp

14 posts in this topic

Any one have idea how to check selected folder size via ftp?


Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

I have no idea now , still looking for help .


Share this post


Link to post
Share on other sites

bump


Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#include <FTPEx.au3>
CODE OUTDATED

When i try this code it doesnt work .

Edited by Gordoni

Share this post


Link to post
Share on other sites

bump


Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

So what does it do?

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

@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.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

outdated

Edited by Gordoni

Share this post


Link to post
Share on other sites

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Thank you for help Jos :x

Edited by Gordoni

Share this post


Link to post
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
Sign in to follow this  
Followers 0