Questions About CFtpFileFind Class
-
There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!
-
There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!
I had problems with this as well when I was using this function. I figured out that apparently this function fails when there is a space in the name of file/directory. Check out for this. Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles
-
There is a question very confusing to me I studied from MSDN sample codes about CFtpFileFind Class and I want to show all files(including directories) in one ftp site so I use such codes like CFtpFileFind FF(...) BOOL bCont=FF.FindFile(_T("*")); if(bCont) while(FF.GetNextFile()) { //classify files or dirs and do different things; //of course when meeting dirs do recursive proc; } But the result is that it can list all files and dirs in some ftp sites but in other sites it will return some "." ".." dirs and lost some dirs. I do not know why this happens,Please help PS: When I wrote the ftp program,I called CInternetFile's GetLength Function but it can not return correct file length,also very strange,Can somebody Help,Thanks!!
jdnx wrote: but in other sites it will return some "." ".." dirs and lost some dirs. Some OSs support the . and .. convention while others do not. jdnx wrote: ...I called CInternetFile's GetLength Function but it can not return correct file length,also very strange... Not all FTP software running on the server has implemented the "length" function.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
I had problems with this as well when I was using this function. I figured out that apparently this function fails when there is a space in the name of file/directory. Check out for this. Steve Mayfield: "Coding in VB is like riding a tricycle...once you figured out how to peddle, its really hard to fall off." My Articles