views:

202

answers:

2

Hi

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.

+1  A: 

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
A: 

I am exactly doing the same ...does it work on windows 7 ? It works if we try to run the ""c:\windows\system32\ftp.exe -s:...." commands on command prompt, but fails through vbscript .. oShell.Run method. it works on windows XP, but I want it to work on windows 7 ..

Any help is appreciated ...

Parag