c implements deploy

/* system example : DIR */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

int main ()
{ int i=0;FILE* read_from;     
          char s[6];char filename[50];
          s[0]='//';
          s[1]='C';
          s[2]='V';
          s[3]='S';
          s[4]='//';
          s[5]='/0';
time_t now; //实例化time_t结构
struct tm *timenow; //实例化tm结构指针
time(&now);
//time函数读取现在的时间(国际标准时间非北京时间),然后传值给now
timenow = localtime(&now);
//localtime函数把从time取得的时间now换算成你电脑中的时间(就是你设置的地区)

printf("Local time is %s/n",asctime(timenow));
char* st=asctime(timenow);
char stc[50]="";
 
for(i=0;i<strlen(st);i++)
{
                        
stc[i]=st[i];                        
}
 
//上句中asctime函数把时间转换成字符,通过printf()函数输出 
strcat(filename,"filter");
 
 strcat(filename,".txt");
read_from = fopen(filename, "w+");     //打开用户指定的文件准备读取
 if(read_from != NULL) {  
 
fwrite(s,sizeof(char),6,read_from);
 fclose(read_from);
}
 
system("xcopy /s C://workspace//oakjheoa//bin//ejb C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//ejbtest.jar//ejb// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//dd//META-INF//application.xml C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//META-INF// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//dd//META-INF//ejb-jar.xml C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//ejbtest.jar//META-INF// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//dd//META-INF//jboss.xml C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//ejbtest.jar//META-INF// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//dd//META-INF//application.xml C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//ejbtest.jar//META-INF// /exclude:filter.txt /D /Y");

system("xcopy /s C://workspace//oakjheoa//bin C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//jsptest.war//WEB-INF//classes// /exclude:filter.txt /D /Y");
system("rd C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//jsptest.war//WEB-INF//classes//ejb /S /q");
system("xcopy /s C://workspace//oakjheoa//lib C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//jsptest.war//WEB-INF//lib// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//dd//WEB-INF C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//jsptest.war//WEB-INF// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//webapp C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//jsptest.war// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//lib//mysql-connector-java-5.0.3-bin.jar C://jboss-4.0.5.GA//server//default//deploy//lib// /exclude:filter.txt /D /Y");
system("xcopy /s C://workspace//oakjheoa//lib//makeform.jar C://jboss-4.0.5.GA//server//default//deploy//eartest.ear//ejbtest.jar// /exclude:filter.txt /D /Y");
  remove(filename);
  time_t now1; //实例化time_t结构
struct tm *timenow1; //实例化tm结构指针
time(&now1);
//time函数读取现在的时间(国际标准时间非北京时间),然后传值给now
timenow1 = localtime(&now1);
//localtime函数把从time取得的时间now换算成你电脑中的时间(就是你设置的地区)
printf("Local time is %s/n",asctime(timenow1));
char* et=asctime(timenow1);
char etc[50]="";
for(i=0;i<strlen(et);i++)
{
                        
etc[i]=et[i];                        
}
 
printf("start time %s end time %s/n",stc,etc);
//上句中asctime函数把时间转换成字符,通过printf()函数输出 
return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值