javascript - Making directory with ANT build.xml throws error creation wasn't successful for unknown reason -
i'm trying create directory lastmodified timestamp of file,but while creating directory timestamp throws error,
<macrodef name="getfiletimes"> <attribute name="dir" /> <attribute name="file" /> <attribute name="setprop" default="@{file}_ctime" /> <sequential> <exec executable="cmd" dir="@{dir}" outputproperty="@{setprop}"> <arg value="/c" /> <arg line="dir @{file} |find ' @{file}'" /> </exec> <script language="javascript"> tmp = project.getproperty("@{setprop}").split(" "); project.setproperty("@{setprop}", tmp[0]+"_"+tmp[2]) ; </script> </sequential> </macrodef> <getfiletimes dir="${results.dir}" file="log.log" /> <echo> $${filemodified_ctime} => ${log.log_ctime} </echo> <mkdir dir="${basedir}/reports/${log.log_ctime}"/> error: creation wasn't successful unknown reason
but instead of ${log.log_ctime} if use ${timestamp} able create folder current timestamp, need folder created time captured.
Comments
Post a Comment