Hi,
I am trying to make use of the function GETTRANSFERREDFILESCOUNT() after calling a sync script to copy down files from remote server but it always returns 0.
tested on versions 4.4 and 4.3
test code is like:
...
...
output is like:
...
...
I also tried usage like
...
...
which also results in 0 when echo'd e.g.
...
...
Every other aspect of the script is working correctly, but I would really like to be able to tell how many files were downloaded.
Any help would be appreciated.
I am trying to make use of the function GETTRANSFERREDFILESCOUNT() after calling a sync script to copy down files from remote server but it always returns 0.
tested on versions 4.4 and 4.3
test code is like:
...
FTP Script
- #open the connection
- $returncode=1
- $file_count=0
output is like:
...
FTP Script
- [ScriptFTP] SSH_FXP_CLOSE (119, 0x0)
- [Server ] SSH_FXP_STATUS (119, 0, 'Success')
- [ScriptFTP] SSH_FXP_LSTAT (120, '/var/www/html/css/jquery.timepicker.css')
- [Server ] SSH_FXP_ATTRS (120)
- [ScriptFTP] SSH_FXP_OPEN (121, '/var/www/html/css/jquery.timepicker.css', 1)
- [Server ] SSH_FXP_HANDLE (121, 0x0)
- [ScriptFTP] SSH_FXP_READ (122, 0x0, 0, 28672)
- [ScriptFTP] SSH_FXP_READ (123, 0x0, 28672, 28672)
- [ScriptFTP] SSH_FXP_READ (124, 0x0, 57344, 28672)
- [ScriptFTP] SSH_FXP_READ (125, 0x0, 86016, 28672)
- [Server ] SSH_FXP_DATA (122, 2215 bytes)
- [Server ] SSH_FXP_STATUS (123, 1, 'End of file')
- [Server ] SSH_FXP_STATUS (124, 1, 'End of file')
- [Server ] SSH_FXP_STATUS (125, 1, 'End of file')
- [ScriptFTP] SSH_FXP_CLOSE (126, 0x0)
- [Server ] SSH_FXP_STATUS (126, 0, 'Success')
- [ScriptFTP] SSH_FXP_REALPATH (127, '/var/www/html/css/')
- [Server ] SSH_FXP_NAME (127, 1 item)
- [ScriptFTP] SSH_FXP_STAT (128, '/var/www/html/css')
- [Server ] SSH_FXP_ATTRS (128)
- 0
I also tried usage like
...
FTP Script
- $longStatus=$file_count." files syncronised from ".$ftpServer." ".$remoteDirToSynchronize
which also results in 0 when echo'd e.g.
...
FTP Script
- 0 files syncronised from 192.168.1.100 /var/www/html/css/
Every other aspect of the script is working correctly, but I would really like to be able to tell how many files were downloaded.
Any help would be appreciated.