- 论坛徽章:
- 0
|
在我的Filename里存的是.rs1的文件,如果文件名为1111_杭州.rs1,文件能正确下载,
如果是io out grps_杭州.rs1时,文件就不能被正确的取出来:
提示out:the system cannot fine the file specified
io: the system cannot find the file specified
如果文件名当中有空格的话,ftp就不能正确下载,请问这个问题该如何解决??
我的对应代码:
char cmd[100],Filename[100],Filedir[100];
printf("%s",Filename);(屏幕上显示为:io out grps_杭州.rs1说明文件名本身没有取错);
sprintf(cmd,"sh d.sh %s %s",Filename,Filedir);
system(cmd);
d.sh:
Filename=$1
Filedir=$2
ftp -n<<!
open 192.168.200.79
user user nbpt
binary
cd $Filedir
get $Filename
close
bye
! |
|