gpt4 book ai didi

javascript - Windows Scripting Host 中的 FTP 文件?

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:22:58 25 4
gpt4 key购买 nike

在 Windows 脚本主机脚本文件 (JavaScript/VBScript) 中以编程方式通过 FTP 传输文件和管理(重命名、移动、删除)FTP 服务器中的文件的推荐方法是什么?最好不需要第 3 方 ActiveX 附加组件,因为这些“额外”软件需要经过审批流程,这将花费很长时间,即使是免费(如啤酒)和/或开源组件也是如此。

脚本将在数据中心环境中的 Windows 2003 Server 中运行。

谢谢。

最佳答案

我知道您可以在没有第三方组件的情况下完成此操作的唯一方法是将 Shell 转换为 ftp.exe。

然后您可以将一系列 FTP 命令放入文本文件中:-

Dim oShell : Set oShell = CreateObject("WScript.Shell")
oShell.Run "c:\windows\system32\ftp.exe -s:myftpcommands.txt", , True

关于javascript - Windows Scripting Host 中的 FTP 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1653698/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com