如何使用在 Windows 计算机上运行的 Ant 任务在 Unix 计算机上创建或删除文件夹

发布于 2024-08-24 16:42:36 字数 74 浏览 3 评论 0原文

我需要删除 Unix 中的一个目录并创建一个新目录。

所有内容都应该是 Windows 计算机中 Ant 任务的一部分

I need to delete a directory in Unix and create a new one.

All should be part of Ant task in Windows machine

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悲凉≈ 2024-08-31 16:42:36

以这种方式尝试可能是值得的,因为我不能 100% 确定您是否可以真正编写登录脚本,否则会产生安全隐患,您的密码将被暴露......所以我之前没有通过使用 putty -m 使用脚本。

putty host -l login_name -pw password -m my_script

my_script 将包含

rmdir some_directory_name

我能想到的另一种方法是使用 AutoIt,这是一种类似于 BASIC 的语法,用于自动执行登录过程,并提供 rmdir 目录名 ,也许为了使其更加灵活,可以向其提供主机、用户 ID、密码和目录名autoit 脚本,可以顺便编译成一个独立的程序......

It might be worth it to try it this way as I am not 100% sure if you can actually script a logging in, security implications otherwise, your password would be exposable...so I have not really done this before by using putty -m using the script in place.

putty host -l login_name -pw password -m my_script

my_script would contain

rmdir some_directory_name

The other way I can think of it is to use AutoIt, which is a BASIC like syntax and to automate the process of logging on, and feeding a rmdir directory_name, perhaps to make it more flexible, supply the host, user id, password and the directory name to the autoit script which, can by the way be compiled to a standalone program...

偏爱你一生 2024-08-31 16:42:36

我使用 SSHEXEC 在远程 unix 机器上创建和删除目录。我只是返回shell 脚本创建和删除目录并使用 sshexec 运行它。
我们可以使用 FTP 做同样的事情,但我无法访问 ftp,所以我使用 sshexec 它工作得很好。

I used SSHEXEC to create and delete directory on remote unix machine.I just return shell script to create and delete directory and run that using sshexec.
Same thing we can do using FTP,But i dont have access to ftp so i used sshexec its working good.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文