Batch file ftp

For tasks involving more complex modifications, conditional processing, loops or other control structures, you should better use the WinSCP. As you can see, using a script like this is a potential security risk: Did you try step 2? Instead of Windows' own native FTP command, you can choose from a multitude of "third party" alternatives.