if DirectoryExists(cookiespath) then 判断目录是否存在 fileexists 是判断文件的 。 转载于:https://www.cnblogs.com/delphi-xe5/p/6148033.html