I am new to Homeseer and have some programing background which I am sure is going to cause more issues than help. I am trying to write a simple script to delete all of the camera files on my FTP using a manual event to run a script. Just seems faster to hit a button then having to open an FTP client and do it manually. I can delete a single file using hs.FTP, but when I try to delete all of the image files using *.jpg as the rfile, nothing happens. I also tried to use the dir command but when I send the result to the log using:
Command = "dir"
ResultVariable = hs.ftp(Host,User,Password,Command,Path,LocalFile,RemoteFile)
hs.WriteLog("msg",ResultVariable)
All I get is a blank line.
So this leaves me scratching my head a little. Does the del command for hs.FTP only work on a single file? Also, for the dir command, a directory listing is returned (or so the manual says); is this a string or an array that needs to be parsed? Looking at the book it would appear to be a string. Any help would be appreciated.
Thanks,
Mark
Command = "dir"
ResultVariable = hs.ftp(Host,User,Password,Command,Path,LocalFile,RemoteFile)
hs.WriteLog("msg",ResultVariable)
All I get is a blank line.
So this leaves me scratching my head a little. Does the del command for hs.FTP only work on a single file? Also, for the dir command, a directory listing is returned (or so the manual says); is this a string or an array that needs to be parsed? Looking at the book it would appear to be a string. Any help would be appreciated.
Thanks,
Mark