ftp ,
如果小文件,文件不多,也可以考虑保存到数据库二进制字段;

解决方案 »

  1.   

    用WEB页给链接共享也可
    用工作组共享文件夹也可
    ‘合同编号’列那里只需给一个路径
      

  2.   

    已完结,自己写出来了,希望能帮到需用的人
    var
      Path:string;
      Wjname: string;
    begin
      if not FileExists(Edit_TjWj.Text) then  //判断是否选文件
      begin
        Application.MessageBox(PChar('找不到文件' + Edit_TjWj.Text), '错误', MB_ICONERROR);
        Exit;
      end;
      //创建'我公司名称'+'对方单位'的文件夹
      Path:=Mail_WdPath+Trim(ADOQuery_HtUpDate.FieldByName('我公司名称').AsString)+'\';
      if not DirectoryExists(Path) then
      CreateDir(Path);
      Path:=Path+Trim(ADOQuery_HtUpDate.FieldByName('对方单位').AsString)+'\';
      if not DirectoryExists(Path) then
      CreateDir(Path);  //复制文件
      Wjname:=ExtractFileName(Edit_TjWj.Text);
      if FileExists(PChar(Path+Wjname))  then //判断文件是否存在
      if Application.MessageBox('注意:文件已存在,是否覆盖!','提示',mb_YesNo+mb_defbutton2+MB_ICONQUESTION)<>IDYES then
      Abort;
       try
        CopyFile(PChar(Edit_TjWj.Text),PChar(Path+Wjname),False);  //True不覆盖同名文件,False覆盖    ExtractFileName(Edit_TjWj.Text),取文件名
        Application.MessageBox('新增数据保存成功。','提示',mb_Ok+MB_ICONINFORMATION);    except
        // ADOConnectionMain.RollbackTrans;
        Application.MessageBox('数据保存不成功!','提示',mb_Ok+MB_ICONINFORMATION);
        Abort;
       end;