需要在远程服务器usint ant中创建文件夹
使用ant scp,我可以将文件从本地系统(windows)复制到服务器(linux)。因此,我需要的是在系统日期之前使用ant在linux系统中的指定目录创建一个文件夹,并将文件复制到创建的文件夹中 这是我的ant脚本:需要在远程服务器usint ant中创建文件夹,ant,scp,Ant,Scp,使用ant scp,我可以将文件从本地系统(windows)复制到服务器(linux)。因此,我需要的是在系统日期之前使用ant在linux系统中的指定目录创建一个文件夹,并将文件复制到创建的文件夹中 这是我的ant脚本: <sshexec host="hostname:22" username="****" trust="true" password="fcubs" command="mkdir $/home/desktop/<folder to be cre
<sshexec host="hostname:22" username="****" trust="true"
password="fcubs"
command="mkdir $/home/desktop/<folder to be creted here>"/>
<scp todir="username@hostname:/home/desktop" password="*****" trust="true">
<fileset dir="D:\kkk"/>
</scp>
请帮帮我
提前感谢您可以使用这样的linux命令来创建目录:
export ATD=`date '+%h-%d-%Y_%H:%M:%S'` && cd /path/to/specified/dir && mkdir $ATD && cd $ATD
它将在dir/path/to/specified/dir中创建dir(例如)“Nov-14-2012\u 17:41:02”,并将cd刻录到其中
执行此命令后,只需将文件复制到目录即可