Hi Guys, new to this so bare with me. I am trying to check to see if a file is on a webserver and if it is, then upload another file. Problem is the time the file is uploaded from remote is random, so I need it to look for a file say: srequest.txt every minute and if found upload a file say: ssafe.txt right after that. Will Script FTP allow me to do this, and can anybody give me a idea as to what type of coding I should be using if it is to work with Script FTP. Any reply to this would be appreciated. Thanks..........
Hi all, I think that I have found the code that I think I need to use, in order for this to work for me below:
The problem is, I need this to run every minute, until it finds the file, and then start all over again on the hour and start again, until it finds the file.
And the other problem is how do I tell it to upload from a local folder from machine.
If anyone can tell me if this will work or if anyone has any other ideas as to how I can get this great. Thanks.
FTP Script
- # Settings
- $ftpserver="127.0.0.1"
- $ftpuser="user"
- $password="123456"
- # Connect to FTP server
- # Enable passive mode (default)
- #Get list of remote file
- # For each file in the remote directory
- # check if it matches "srequest.txt"
- $found="FALSE"
- $found="TRUE"
And the other problem is how do I tell it to upload from a local folder from machine.
If anyone can tell me if this will work or if anyone has any other ideas as to how I can get this great. Thanks.
Hi,
You can use the ScriptFTP scheduler to run a script file every minute. I have made a screenshot to show you the sequence of windows you have to open to reach the place where this is set.
Another way to do that is to use the WHILE command. For example:
You can of course use a combination of the two methods
You can use the ScriptFTP scheduler to run a script file every minute. I have made a screenshot to show you the sequence of windows you have to open to reach the place where this is set.
Another way to do that is to use the WHILE command. For example:
You can of course use a combination of the two methods
liked Script FTP? Try our other product Email Parser
Thanks to all the people who took the time to reply to my post. I have another question, is their a way for the script to inform me via email if their has been a problem or an error. Thanks.
Thanks Wandrey
liked Script FTP? Try our other product Email Parser
- All times are UTC -