如何在Lotusscript中将文件复制到远程服务器
我想创建一个将在服务器上运行以生成文本文件的 Lotus Notes 代理。创建文件后,我需要将其发送到远程服务器。
将文件发送到远程服务器的最佳/最简单方法是什么?
谢谢
I want to create a Lotus Notes agent that will run on the server to generate a text file. Once the file is created, I need to send it to a remote server.
What is the best/easiest way to send the file to a remote server?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的“远程”服务器位于本地 Windows 网络上,则只需使用 FileCopy 语句将文件从服务器文件系统复制到 UNC 路径 (\myserver\folder\file.txt)。如果没有,您可能需要考虑使用 Java 代理,这将使更多文件传输协议更容易访问。
无论哪种情况,请务必了解 Notes 代理的安全限制 - 为了使代理在服务器上运行并在服务器的文件系统上创建文件,需要将代理标记为运行时安全级别 2 或 3,并由适当授权的 ID 签名。
If your "remote" server is on a local windows network, you can simply copy the file from the server file system to a UNC path (\myserver\folder\file.txt) using the FileCopy statement. If not, you may want to look at using a Java agent, which would make more file transfer protocols easily accessible.
In either case, be sure to understand the security restrictions on Notes agents - for your agent to run on the server and create a file on the server's file system, the agent will need to be flagged with a runtime security level of 2 or 3, and signed by an appropriately authorized ID.
使用类似操作系统的命令向远程服务器发送或复制文件需要目标服务器也映射为源服务器上的驱动器。正如埃德正确所说,安全性需要允许您将文件保存到服务器上,然后尝试复制它们。
您可以在服务器本地生成文件,然后在脚本中使用 FTP 命令发送文件。或者,如果您是 Java 专家,您也可以尝试使用 Java.FTP 发送文件。我遇到了一些麻烦,但如果在目标服务器上设置了 FTP 帐户,应该是可以的。可以在此处和这里
我已经使用脚本完成了它,它很笨拙,但在简单地推送文件方面很有效。理想情况下,如果另一端的服务器也是 Domino 服务器,您实际上可以将文件附加到电子邮件中并将其发送到目标服务器上的邮件帐户。我以前已经这样做过,这很棒,因为您可以将获取文件的整个问题传递给 SMTP 进程。
Sending or copying files using O/S like commands to a remote server require that destination servers be also mapped as drives on your source server. As Ed rightly said, security needs to allow you to save files down onto the server and then try and copy them.
You can generate the file locally on the server and then use FTP commands in a script to send the file. Or if you're a java guru, you can try using Java.FTP to send the file as well. I had some trouble with it, but it should be possible providing an FTP account is setup on the destination server. FTP related stuff by a well known notes guy can be found here and here
I have done it using a script, and it's clumsy but effective in simply pushing files around. Ideally, if the server at the other end is a Domino server as well, you could actually attach the file in an email and send it to a mailin account on the destination server. I have done that before, and it's great as you can just pass the whole problem of getting files off to the SMTP process.