FTP File Exists

From UBot Studio
Revision as of 17:23, 5 January 2017 by LillyT (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

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".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox