ant:从Windows上的远程位置复制文件 [英] ant: copy file from remote location on windows
本文介绍了ant:从Windows上的远程位置复制文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将共享位置中存在的文件复制到Windows计算机.有什么方法可以在复制文件时指定用户名和密码?
I want to copy a file present in a shared location to windows machine. Is there some way by which i can specify username and password while copying the file?
如果我尝试使用复制任务进行访问,则错误提示位置不存在.是因为允许吗?
If i try to access using copy task, it is giving error saying location does not exist. is it because of permission?
<copy todir="C:/localdir">
<fileset dir="\\\remotemachinename\dirname">
</fileset>
</copy>
推荐答案
我认为您的地址可能不正确.
I think you may have the address wrong.
我刚刚成功尝试了以下测试(两个斜杠):
I just tried the following tests successfully(2 slashes):
dir="\\remotemachinename\dirname"
dir="//remotemachinename/dirname"
但这没有成功(3个反斜杠):
But this was unsuccessful (3 backslashes):
dir="\\\remotemachinename\dirname"
但是,我正在访问的目录不需要密码.
However, no password was required for the directory I was accessing.
这篇关于ant:从Windows上的远程位置复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文