getting quota (space) for an logged-in user in FTP
-
Hello Guys, How ru doing, I need some help in FTP, first i will clearly explain u the situation..... i have one one FTP user login, i have logged into the FTP server with that login, now by code i need to know how much space like .... The total space allocated for the user, the space occupied by the user, and the remaining space. currently i have one solution...but its not working fine...i.e i can execute a FTP command through code like "ls", doing this will return a string to me containing the result(text string) for the executed command. the problem here is this is not working all the time....if the data commection is lost it just hangs offff and many other problems are there. guys plz help me out of this problem....waiting for the solution
-
Hello Guys, How ru doing, I need some help in FTP, first i will clearly explain u the situation..... i have one one FTP user login, i have logged into the FTP server with that login, now by code i need to know how much space like .... The total space allocated for the user, the space occupied by the user, and the remaining space. currently i have one solution...but its not working fine...i.e i can execute a FTP command through code like "ls", doing this will return a string to me containing the result(text string) for the executed command. the problem here is this is not working all the time....if the data commection is lost it just hangs offff and many other problems are there. guys plz help me out of this problem....waiting for the solution
in UNI*/perl
$dir = "/myserver/mydir"; $aa=qx(du -s -k -m $dir); print " size of website in MB $aa ";
in FTP I think your only solution is to manually recurse through all the subdirectories geting the size of each file, if you are using the MFC CFtpFileFind is one solution
"Laughing at our mistakes can lengthen our own life. Laughing at someone else's can shorten it." - Cullen Hightower
-
in UNI*/perl
$dir = "/myserver/mydir"; $aa=qx(du -s -k -m $dir); print " size of website in MB $aa ";
in FTP I think your only solution is to manually recurse through all the subdirectories geting the size of each file, if you are using the MFC CFtpFileFind is one solution
"Laughing at our mistakes can lengthen our own life. Laughing at someone else's can shorten it." - Cullen Hightower
Ted...thanks for ur reply man... Actually the Server which iam going to connect is Windows wunning Windows Media Server as u said iam able to get the size of the files in the server...but i need one more thing...i.e the maximum space allocated for the user...i.e in my application i upload some as per the user request...when uploading the file, i should the left out empty space for the user..if its less then i have stop the upload ...this is the scenario....got it fed....can u help me out of this solution
-
Ted...thanks for ur reply man... Actually the Server which iam going to connect is Windows wunning Windows Media Server as u said iam able to get the size of the files in the server...but i need one more thing...i.e the maximum space allocated for the user...i.e in my application i upload some as per the user request...when uploading the file, i should the left out empty space for the user..if its less then i have stop the upload ...this is the scenario....got it fed....can u help me out of this solution
Sorry can't help you there.
"Laughing at our mistakes can lengthen our own life. Laughing at someone else's can shorten it." - Cullen Hightower