[英]Given username and password, how do I copy files from one machine to another using perl on windows
I main issue is of authentication, then the actual copying of files from once machine to another. 我的主要问题是身份验证,然后将文件从一台计算机实际复制到另一台计算机。 By the way both these machines are on the same network ie connected through LAN.
顺便说一下,这两个机器都在同一网络上,即通过LAN连接。
Is there any perl function to do this. 是否有任何perl函数可以执行此操作。 Plus, I wanted to make sure if authentication is absolutely necessary.
另外,我想确保验证是否绝对必要。
If they are two windows machines or if both have samba or CIFS shares--below or at where you want to copy from/to, then you can just map or mount one onto the other machine and copy that way. 如果它们是两台Windows计算机,或者两者都具有samba或CIFS共享(在下面或要在其中复制/复制的位置),则可以将其中一个映射或挂载到另一台计算机上,然后进行复制。 The security depends on your network and how the shares were set up.
安全性取决于您的网络以及共享的设置方式。
Also, in this vein, given the hostname or ip you might be able to use a UNC path: 同样,按照这种方式,给定主机名或ip,您也许可以使用UNC路径:
\\remotehost\c$\Users\Me\Documents -- depending on your level of access
Otherwise there is Net::FTP
if you don't need SSL and Net::SCP
/ SFTP
if you do. 否则,如果您不需要SSL,则有
Net::FTP
如果不需要,则有Net::SCP
/ SFTP
。 You can often script these to do directory copies. 您通常可以使用脚本编写目录副本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.