Good morning, new member with minimal IT skills (main job is as a dairy veterinarian). Have been working with ScriptFTP to retrieve data files from a memory card located within a PLC monitoring data collected from a methane digester (I know, lots of manure!). Basically the data is stored on this memory card and it is connected to an XP based computer. I am currently able to use standard ftp shell commands to go to the "server" card, pull the data and delete the files when finished. I am trying to do this with ScriptFTP but am having problems.
Data on PLC memory card ("server") is stored in the /StorageCard/DATA/gmf_data directory and consists of files with a .GDB extension. Files have names like [Temp Collection10.GDB] or [Flare Temp10.GDB] with the barckets ([]).
Using ScriptFTP I am able to connect to the server and migrate to the data directory but when I use GETLIST($list,REMOTE_FILES), it returns "OK" but it also then returns 0 files. What am I doing wrong??
A partial list of the script file DailyFTP.ftp
Here is the part of the file DailtFTPError.LOG that is created
Thanks for all the help! I have attached both the script file and the log file for review.
Data on PLC memory card ("server") is stored in the /StorageCard/DATA/gmf_data directory and consists of files with a .GDB extension. Files have names like [Temp Collection10.GDB] or [Flare Temp10.GDB] with the barckets ([]).
Using ScriptFTP I am able to connect to the server and migrate to the data directory but when I use GETLIST($list,REMOTE_FILES), it returns "OK" but it also then returns 0 files. What am I doing wrong??
A partial list of the script file DailyFTP.ftp
Code: Select all
# Go to /StorageCard/ and checks to see if it completes
$result=CHDIR("/StorageCard/DATA/gmf_data")
IF($result!="OK")
PRINT($datetime." Unable to change to remote directory")
STOP
END IF
PRINT($datetime." Remote directory is ".CWDIR())
# Get list of remote directories and files and checks to see if it completes
$result=GETLIST($list,REMOTE_FILES,"*.*")
IF($result!="OK")
PRINT($datetime." Unable to get list of remote files")
STOP
END IF
PRINT($datetime." List of remote files is created")
# Print names of each file in $list
FOREACH $item IN $list
PRINT($datetime." ".$item)
END FOREACH
Here is the part of the file DailtFTPError.LOG that is created
CHDIR("/StorageCard/DATA/gmf_data")
Changing current remote directory to /StorageCard/DATA/gmf_data
CWD /StorageCard/DATA/gmf_data
250 CWD Requested file action okay, completed.
PWD
257 "/StorageCard/DATA/gmf_data" is current directory.
CWDIR()
2010_07_08-12_35_23 Remote directory is /StorageCard/DATA/gmf_data
GETLIST(REMOTE_FILES,"*.*")
Getting file listing of current remote directory
PASV
227 Entering Passive Mode (192,168,1,1,6,27)
Opening data connection to 192.168.1.1 Port: 1563
LIST
150 Connection accepted.
226 Transfer complete.
323 bytes transferred. (19.7 KB/s) (16 ms)
Found 0 files.
2010_07_08-12_35_23 List of remote files is created
2010_07_08-12_35_23 Transfer complete
Thanks for all the help! I have attached both the script file and the log file for review.
Hello,
When you say "I am currently able to use standard ftp shell commands", could you please give an example, also what is the FTP "server" software ? That is, have you installed something like Filezilla ?
Many thanks.
Zythan
When you say "I am currently able to use standard ftp shell commands", could you please give an example, also what is the FTP "server" software ? That is, have you installed something like Filezilla ?
Many thanks.
Zythan
Hi Zythan,
Thanks for the quick reply. What I mean by ftp shell commands is that using command.exe in XP, I can ftp to the server, login and retrieve files or whatever I need to do with those commands. I am a novice so I don't know what "server" I am using. Is there a way for me to check that with commands?
Thanks
Thanks for the quick reply. What I mean by ftp shell commands is that using command.exe in XP, I can ftp to the server, login and retrieve files or whatever I need to do with those commands. I am a novice so I don't know what "server" I am using. Is there a way for me to check that with commands?
Thanks