KB Article #50423

How to customize the FTP script to retrieve a fixed name file

Problem

FTP script to retrieve the specific files (files with fixed name like a.txt , b.txt) from remote computer.


Resolution

CD  "\\\\computer_name\\path";



-LIST "*" INTO %F {



IF(%F="b.txt" )
{
-RECV %F;
IF(%FTPSTATUS IN "200"-"299") {
DELETE %F;
}
}
}



IF(%F="a.txt" )
{
-RECV %F;
IF(%FTPSTATUS IN "200"-"299") {
DELETE %F;
}
}