gpt4 book ai didi

powershell - 我可以从脚本或命令行将文件复制到网上邻居吗?

转载 作者:行者123 更新时间:2023-12-02 22:46:03 35 4
gpt4 key购买 nike

在 Windows XP 中,是否可以通过命令行、批处理文件或者更好的 PowerShell 脚本将文件复制到网上邻居?

促使我走上这条研究道路的是尝试将文件从用户的计算机发布到 WSS 3.0 文档库。我无法将驱动器映射到有问题的库,因为 WSS 站点只能通过 NTLM 在 80 或 443 以外的端口上进行身份验证。我想我可以交替使用 WSS Web 服务来推送文件,但我我现在真的很好奇这个问题的答案。

最佳答案

使用批处理文件,您可以登录资源并复制文件:

批处理文件将包含以下内容:

net use \\{dest-machine}\{destfolder} {password} /user:{username}
copy {file} \\{dest-machine}\{destfolder}

例如

net use \\Development\myfolder mypassword /user:Administrator
copy newfile.c \\development\myfolder

关于powershell - 我可以从脚本或命令行将文件复制到网上邻居吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10313/

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