grasshopper3 Posted June 4, 2010 Posted June 4, 2010 (edited) Does anyone know how to make this function correctly pull back dates for files? _FTP_FindFileFirst or _FTP_FindFileNext. They return 0 for dates. Is there a FTP setting that I am missing or something? Func ScanFolders($SourceFolder, $Name) Local $FileArray,$FullFilePath, $hSearch $FileArray = _FTP_FindFileFirst($Conn, $SourceFolder & "\*", $hSearch) IF $FileArray[0] = 0 or @error = -1 Then _FTP_FindFileClose($hSearch) Else _ArrayDisplay($FileArray) $FullFilePath = $SourceFolder & "\" & $FileArray[10] If $FileArray[1] = 16 Then ScanFolders($FullFilePath, $Name) Else csvFile($FullFilePath, $FileArray[10], $Name) EndIf While 1 $FileArray = _FTP_FindFileNext($hSearch) IF $FileArray[0] = 0 Then ExitLoop EndIf _ArrayDisplay($FileArray) $FullFilePath = $SourceFolder & "\" & $FileArray[10] If $FileArray[1] = 16 Then ScanFolders($FullFilePath, $DistrictName) Else csvFile($FullFilePath, $FileArray[10], $Name) EndIf WEnd EndIf _FTP_FindFileClose($hSearch) Return EndFunc Edited June 4, 2010 by grasshopper3
BitByteBit Posted June 4, 2010 Posted June 4, 2010 Does anyone know how to make this function correctly pull back dates for files? _FTP_FindFileFirst or _FTP_FindFileNext. They return 0 for dates. Is there a FTP setting that I am missing or something? $FileArray = _FTP_FindFileFirst($Conn, $SourceFolder & "\*", $hSearch,$INTERNET_FLAG_RELOAD)) I had the same problem, Yashied very kindly helped me out. Use the $INTERNET_FLAG_RELOAD option with _FTP_FindFileFirst.
grasshopper3 Posted June 5, 2010 Author Posted June 5, 2010 I tried the $INTERNET_FLAG_RELOAD flag and was getting the same result, but I was able to fix my problem with a few changes to the ..FindFileFirst functions. I will post my changes here when I get a chance.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now