Salesforce B2C Commerce implements an FTP client in the B2C Commerce Script API to enable developers to access remote locations via the FTP protocol. The FTPClient class can be used to pull or push files that don't have to be transmitted securely. Because it isn't a secure transfer protocol, we recommend that you use the FTPClient only for sandboxes.
The FTPClient class supports the FTP commands CD, GET, PUT, DEL, MKDIR, RENAME, and LIST. Because the RMD command isn't supported, it isn't possible to delete directories using the B2C Commerce FTP client.
var ftp : FTPClient = new dw.net.FTPClient();
ftp.connect("http://www.myinstance.com", "username", "password");
var data : String = ftp.get("simple.txt");