FTP File Exists
From UBot Studio
(Difference between revisions)
(Created page with "This is an FTP Functions This function will check if a file exists on the connected FTP server. It will return "true" if the file exists and return "false" ...") |
|||
(5 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | This is an [[FTP | + | This is an [[FTP Functions|FTP Function]] |
This function will check if a file exists on the connected FTP server. | This function will check if a file exists on the connected FTP server. | ||
Line 16: | Line 16: | ||
− | In the example above, the ftp file exists function has been placed inside the [[ | + | In the example above, the ftp file exists function has been placed inside the [[Set]] command. The [[Set]] is then placed inside the [[Connect to FTP Server]] command. |
+ | |||
+ | [[File:ftpfe.jpg]] | ||
+ | |||
+ | Running the script will set the variable to "true" if the file exists within the specified location. If the file does not exists within the location, the variable will be set to "false". |
Latest revision as of 17:23, 5 January 2017
This is an FTP Function
This function will check if a file exists on the connected FTP server.
It will return "true" if the file exists and return "false" if it does not.
The FTP File Exists function can be used in any command in UBot Studio, as along as the command is in the Connect to FTP Server command.
plugin command("FTPCommands.dll", "connect to ftp server", "FTP", "ftp.mysite.org", 21, "myusername", "p4ssw0rd", " /var/www/mysite.com/files") { set(#file exists, $plugin function("FTPCommands.dll", "$ftp file exists", "myfile.txt"), "Global") }
In the example above, the ftp file exists function has been placed inside the Set command. The Set is then placed inside the Connect to FTP Server command.
Running the script will set the variable to "true" if the file exists within the specified location. If the file does not exists within the location, the variable will be set to "false".