向大家求救,怎样写DELPHI代码调出指定文件的路径

解决方案 »

  1.   

    function ExtractFilePath(const FileName: string): string;
      

  2.   

    ShellExecute(handle, 'open',‘c:\*.exe', nil, nil, SW_SHOWNORMAL);
    这是调用运行程序的例子
    我不知道你是具体要调用什么文件!
    如果调用其他 就要用OpenDialog了!
      

  3.   

    var s:string;
    begin
    opendialog1.execute;
    s:=opendialog1.getnamepath;
    end;
      

  4.   

    ExpandFileName() 返回文件的全路径(含驱动器、路径) 
    ExtractFileExt() 从文件名中抽取扩展名 
    ExtractFileName() 从文件名中抽取不含路径的文件名 
    ExtractFilePath() 从文件名中抽取路径名 
    ExtractFileDir() 从文件名中抽取目录名 
    ExtractFileDrive() 从文件名中抽取驱动器名 
    ExpandUNCFileName() 返回含有网络驱动器的文件全路径 
    ExtractRelativePath() 从文件名中抽取相对路径信息 用OpenDialog.FileName做参数
      

  5.   

    用getcurrentdir()
    extractfilepath()
    这两个API试试!
    有问题请发信息到我的E-mail:[email protected]