4

What is the recommended way to transfer files via FTP and manage (rename, move, delete) files in an FTP server programmatically in a Windows Scripting Host script file (JavaScript/VBScript)? Preferably without requiring 3rd party ActiveX add-ons since these "extra" software will need to go through an approval process that will take a very long time, even for free (as in beer) and/or open source components.

The script is going to be run in a Windows 2003 Server in data center environment.

Thanks.

vy32
  • 28,461
  • 37
  • 122
  • 246
adib
  • 8,285
  • 6
  • 52
  • 91

1 Answers1

2

The only way I know that you can do it without third party components is to Shell to ftp.exe.

You would place a series of FTP commands in a text file then:-

Dim oShell : Set oShell = CreateObject("WScript.Shell")
oShell.Run "c:\windows\system32\ftp.exe -s:myftpcommands.txt", , True
AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306