在命令行输入如下命令:

xcopy /s c:\ d:\,

各个参数如下:

参数1:命令字xcopy

参数2:字符串/s

参数3:字符串c:\

参数4: 字符串d:\

include<stdio.h>

include<string.h>

int main()
{
int i,k=0,len;
char s[1000];
while(gets(s))
{
len=strlen(s);
for(i=0;i<len;i++)
{
if(s[i]!='"')
{
if(s[i]==' ')
k=k+1;
}
else
{
i++;
while(s[i]!='"')
{
i++;
}
}
}
printf("%d\n",k+1);
for(i=0;i<len;i++)
{
if(s[i]!=' '&&s[i]!='"')
printf("%c",s[i]);
else if(s[i]=='"')
{
i++;
while(s[i]!='"')
{
printf("%c",s[i]);
i++;
}
}
else
printf("\n");
}
}
return 0;
}